f



Object REXX is a s***...

at least the current OS/2 implementation...

according to the object REXX reference something like 'b2.' is a valid
stem name, but object REXX sometimes does not like it:

----------8<-------- cut here ---------------8<----------
/* test1.cmd : in this sample script SysStemCopy() returns -1 */

a.0 = 3
a.1 = "one"
a.2 = "two"
a.3 = "three"

b2. = retstem();

say SysStemCopy(b2., a., 1, a.0 + 1, b2.0, "I");

exit

/* test procedure returning a stem object */
retstem: procedure
   c.0 = 3
   c.1 = "111"
   c.2 = "222"
   c.3 = "333"
return c.
/* end of test1.cmd */
----------8<-------- cut here ---------------8<----------
/* test2.cmd : a reference to the b2. stem has been added and
   SysStemCopy() now returns 0 */

a.0 = 3
a.1 = "one"
a.2 = "two"
a.3 = "three"

b2. = retstem();

c. = b2. /* c. is never used but it makes the next call succesful */

say SysStemCopy(b2., a., 1, a.0 + 1, b2.0, "I");

exit

/* test procedure returning a stem object */
retstem: procedure
   c.0 = 3
   c.1 = "111"
   c.2 = "222"
   c.3 = "333"
return c.
----------8<-------- cut here ---------------8<----------

--
bye
Alessandro
0
tin
3/20/2006 1:11:18 PM
comp.os.os2.programmer.misc 1326 articles. 0 followers. Post Follow

101 Replies
651 Views

Similar Articles

[PageSpeed] 47

In <2nqHEJzxPnOO092yn@tin.it>, on 03/20/2006
   at 02:11 PM, @tin.it (Alessandro) said:

>at least the current OS/2 implementation...

This is not a OREXX issue.  This is a typical REXX coding error.  If you
want to pass a constant string to function, you need to quote the
expression to prevent unexpected side effects that can occur if you let
REXX evaluate the string as an expression.

Add the following to test1.cmd

 say 'b2.' b2.
 say 'a.' a.

and you wil understand why you should have written the function call as

 say SysStemCopy('b2', 'a', 1, A.0 + 1, b2.0, "I")

Note the trailing periods are not part of the stem name so I omit them to
avoid false assumptions.

I haven't checked to be sure, but I'm reasonably sure that your code would
have run in Classic REXX because the valude of b2. would have been 'B2.' 
However, someone running Classic REXX needs to check this to be sure.

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/20/2006 6:35:43 PM
In article <441ef5ff$2$fgrir53$mr2ice@news.west.earthlink.net>,
Steven Levine <steve53@earthlink.bogus.net> wrote:

 >This is not a OREXX issue.  This is a typical REXX coding error.  If you
 >want to pass a constant string to function, you need to quote the

what constant string ??? I'm passing a stem object not a string !

OK! I had another look at the documentation of SysStemObject and
realized that you are right...

BTW during the last few months, in my spare time, I've been reading
documentation about many different scripting languages (java, python,
ruby, ici, lua, pike, etc...)
I hardly found a language as inconsistent and poorly designed as REXX

Yes you can do everything with REXX, even non trivial programs, but
even C will be easier in that case...

--
bye
Alessandro
0
tin
3/21/2006 4:49:59 AM
On Tue, 21 Mar 2006 04:49:59 UTC,         @tin.it (Alessandro) wrote:

> BTW during the last few months, in my spare time, I've been reading
> documentation about many different scripting languages (java, python,
> ruby, ici, lua, pike, etc...)
> I hardly found a language as inconsistent and poorly designed as REXX

Then you haven't looked at Perl!

REXX isn't inconsistent - you just haven't absorbed the model yet!

0
Bob
3/21/2006 5:00:17 PM
On 21 Mar 2006 17:00:17 GMT, Bob Eager <rde42@spamcop.net> wrote:

> On Tue, 21 Mar 2006 04:49:59 UTC,         @tin.it (Alessandro) wrote:
> 
>> BTW during the last few months, in my spare time, I've been reading
>> documentation about many different scripting languages (java, python,
>> ruby, ici, lua, pike, etc...)
>> I hardly found a language as inconsistent and poorly designed as REXX
> 
> Then you haven't looked at Perl!

No thanks.

> REXX isn't inconsistent - you just haven't absorbed the model yet!

Whatever, but it is very difficult to predict what REXX is going to do,
which makes coding very unpredicatable and error prone.
A classic example of this is eCSMT - that thing has more bugs in it than
anything I've come across and most of those are because it is written in
REXX. The same old bugs over and over and over again.
Perhaps it is just poor documentation which lets it down. It is very
powerful, but incredibly difficult to catch all the logic holes in anything
non-trivial.
0
Paul
3/21/2006 6:50:05 PM
In <3X4HEJzxPjWa092yn@tin.it>, on 03/21/2006
   at 05:49 AM, @tin.it (Alessandro) said:

>what constant string ??? I'm passing a stem object not a string !

>OK! I had another look at the documentation of SysStemObject and realized
>that you are right...

Correct.  You are passing the name of the stem as a string.  Just keep in
mind that the REXX DLL API interface was never updated to support objects. 
It's hard to pass something the API does not understand.  Also, you
probably should re-read the definition of stems so you understand what
"stem." means.

>I hardly found a language as inconsistent and poorly designed as REXX

There are aspects of REXX syntax I find annoying, but is entirely
consistent.  The design is OK, but in general I prefer languages that help
the programmer not make obvious mistakes.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/21/2006 11:40:05 PM
In <slrne20imt.u1v.abuse@news.pr.network>, on 03/21/2006
   at 06:50 PM, Paul Ratcliffe <abuse@orac12.clara34.co56.uk78> said:

>Whatever, but it is very difficult to predict what REXX is going to do,
>which makes coding very unpredicatable and error prone.

IMO, the problem is that, by default, REXX ignores most errors.  This is
OK if you are a perfect programmer.  I'm far from that good.  What I do is
start every REXX program I write with

 signal on Error
 signal on FAILURE name Error
 signal on Halt
 signal on NOTREADY name Error
 signal on NOVALUE name Error
 signal on SYNTAX name Error

which brings the base error checking up to something reasonable.  Running
OREXX helps too because it catches the syntax errors sooner rather than
later.

>Perhaps it is just poor documentation which lets it down. It is very
>powerful, but incredibly difficult to catch all the logic holes in
>anything non-trivial.

The Classic REXX manual that IBM delivers with OS/2 is limited.  There are
plenty of good REXX references available.

FWIW, I don't believe REXX should be used for large applications.  Of
course, folks use what they know, so there are plenty of large
applications written in REXX.

If one must write a large application in REXX, it should be designed a a
set of small REXX programs that work together.  These should be small
enough so that they can be realistically validated with a reasonable
amount of effort.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/22/2006 12:04:51 AM
In article <44208ed5$1$fgrir53$mr2ice@news.west.earthlink.net>,
Steven Levine <steve53@earthlink.bogus.net> wrote:

Hi Steven

 >Correct.  You are passing the name of the stem as a string.  Just keep in
 >mind that the REXX DLL API interface was never updated to support objects.
 >It's hard to pass something the API does not understand.  Also, you
 >probably should re-read the definition of stems so you understand what
 >"stem." means.

I know what a stem is (that is a sort of array whose elements are accessed
by keys rather than numeric indexes)

 >>I hardly found a language as inconsistent and poorly designed as REXX
 >
 >There are aspects of REXX syntax I find annoying, but is entirely
 >consistent.  The design is OK, but in general I prefer languages that help
 >the programmer not make obvious mistakes.

one of the greater inconsistencies is that it is case insensitive in
most instances, but in some instances it yelds inexpected results
unless you uppercase variable names

besides that, being an high level language REXX should make programming
easier and more productive, but with its odd logic it often causes
more troubles than it solves

the problem is that it was born as a command shell scripting language
and all the new features which have been added during the years do not
always fit well with the original purpose of the language

e.g. dealing with hexadecimal numbers is a nightmare (as the format is not
endian-agnostic)

having to use CALL, when a procedure return value is not used, is another
of the most boring 'features' and is one of the most typical hint of the
original purpose of the REXX language (they had to use CALL
to avoid passing the procedure result to the command shell)

the only good REXX feature is its full integration with the OS...

--
bye
Alessandro
0
tin
3/22/2006 5:21:23 AM
On Tue, 21 Mar 2006 23:40:05 GMT, Steven Levine wrote:

<snip>

>There are aspects of REXX syntax I find annoying, but is entirely
>consistent.  The design is OK, but in general I prefer languages that help
>the programmer not make obvious mistakes.

AIUI REXX was designed to make the REXX programmers task easy. That made
writing the interpreter hard - but you only do that once :-)

C on the other hand was designed to make writing the compiler easy and sod the
poor programmer.

-- 

Regards

Dave Saville

NB Remove -nospam for good email address


0
Dave
3/22/2006 8:25:34 AM
On Wed, 22 Mar 2006 08:25:34 +0000 (GMT), Dave Saville
<dave@deezee-nospam.org> wrote:
> AIUI REXX was designed to make the REXX programmers task easy. That made
> writing the interpreter hard - but you only do that once :-)
>
> C on the other hand was designed to make writing the compiler easy and sod the
> poor programmer.

OTOH, one advantage of C is that, since it leaves so much up to the
programmer, the language itself is quite small and consistent.  This means
that when you have a bug, you can usually be pretty sure it's something
you're doing wrong (which makes debugging a simple matter of legwork),
instead of something sneaky the compiler or interpreter is doing that 
you didn't expect.  Most of the time, anyway. :)

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/22/2006 3:59:01 PM
On Wed, 22 Mar 2006 15:59:01 UTC, Alex Taylor <mail.me@reply.to.address>
wrote:

> OTOH, one advantage of C is that, since it leaves so much up to the
> programmer, the language itself is quite small and consistent.  This means
> that when you have a bug, you can usually be pretty sure it's something
> you're doing wrong (which makes debugging a simple matter of legwork),
> instead of something sneaky the compiler or interpreter is doing that 
> you didn't expect.  Most of the time, anyway. :)

Taking that to its logical solution, they should have stuck with C's 
predecessor's (B) predecessor (BCPL)....

0
Bob
3/22/2006 6:13:44 PM
Alex Taylor wrote:

>> C on the other hand was designed to make writing the compiler easy and sod the
>> poor programmer.
> 
> OTOH, one advantage of C is that, since it leaves so much up to the
> programmer, the language itself is quite small and consistent.  This means
> that when you have a bug, you can usually be pretty sure it's something
> you're doing wrong (which makes debugging a simple matter of legwork),
> instead of something sneaky the compiler or interpreter is doing that 
> you didn't expect.  Most of the time, anyway. :)
> 
  From my own experience, I can say that a big advantage of C is that 
it's explicit. The compiler isn't trying to be too clever and isn't 
hiding anything or doing things behind your back. That becomes a major 
plus if you have to dig into a large project, especially one that 
someone else wrote. If it was written in C, everything is right there in 
front of you. If it's C++ (for instance), you have absolutely no idea 
what a line of code might be doing - operator overloading, inheritance, 
etc. etc. means that 'a + b' might do absolutely anything.


           Michal
0
Michal
3/22/2006 6:21:40 PM
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Michal Necasek 
<michaln@scitechsoft.com>], who wrote in article <UAgUf.4041$tN3.3362@newssvr27.news.prodigy.net>:
>   From my own experience, I can say that a big advantage of C is that 
> it's explicit.

When this is true, it is very helpful indeed.

> The compiler isn't trying to be too clever and isn't hiding anything
> or doing things behind your back.

Unfortunately, this is not entirely true.  Witness -fno-strict-aliasing,
and other voodoo is sometimes required to make things more explicit...

Hope this helps,
Ilya
0
Ilya
3/22/2006 6:36:01 PM
Ilya Zakharevich wrote:

>> The compiler isn't trying to be too clever and isn't hiding anything
>> or doing things behind your back.
> 
> Unfortunately, this is not entirely true.  Witness -fno-strict-aliasing,
> and other voodoo is sometimes required to make things more explicit...
> 
  The language standard knows no such thing as -fno-strict-aliasing. If 
you find you need to specify such custom flags to a tool of your choice, 
that is a problem with the tool of your choice, not the language.


        Michal
0
Michal
3/22/2006 7:33:19 PM
In <qnirqrrmrrbet.iwj6mm0.pminews@news.aaisp.net.uk>, on 03/22/2006
   at 08:25 AM, "Dave Saville" <dave@deezee-nospam.org> said:

>AIUI REXX was designed to make the REXX programmers task easy. That made
>writing the interpreter hard - but you only do that once :-)

>C on the other hand was designed to make writing the compiler easy and
>sod the poor programmer.

Interesting POV, but not one I would agree with.  Both languages were
designed to solve very different problems and in different eras.  REXX
clearly shows its mainframe heritage while C shows its small machine,
limited resources heritage.

See

  http://www.redbooks.ibm.com/redbooks/GG244199.html

and

 http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

for what the respective language authors of the languages have to say.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/22/2006 9:08:54 PM
Steven Levine wrote:

....cut...

> Interesting POV, but not one I would agree with.  Both languages were
> designed to solve very different problems and in different eras.  REXX
> clearly shows its mainframe heritage while C shows its small machine,
> limited resources heritage.

Hardly either (at those times even mainframe resources were scarce and "small machines", even if 
there were even smaller machines). Today a Linux watch has more horse power and resources than a 
mainframe 25 years ago, let alone a Windows Smartphone ...

;-)


> See
> 
>   http://www.redbooks.ibm.com/redbooks/GG244199.html
> 
> and
> 
>  http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
> 
> for what the respective language authors of the languages have to say.

For Rexx probably Mike F. Cowlishaw would be the most authorative source, e.g. <The Early History of 
REXX>, e.g. <http://www.computinghistorymuseum.org/ieee/af_forum/read.cfm?forum=10&id=21&thread=7>.


---rony
0
rony
3/22/2006 10:49:39 PM
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Michal Necasek 
<michaln@scitechsoft.com>], who wrote in article <3EhUf.58560$Jd.42931@newssvr25.news.prodigy.net>:
> >> The compiler isn't trying to be too clever and isn't hiding anything
> >> or doing things behind your back.

> > Unfortunately, this is not entirely true.  Witness -fno-strict-aliasing,
> > and other voodoo is sometimes required to make things more explicit...

>   The language standard knows no such thing as -fno-strict-aliasing. If 
> you find you need to specify such custom flags to a tool of your choice, 
> that is a problem with the tool of your choice, not the language.

LOL!  (Compare this with what you wrote above: "The compiler isn't
trying to be too clever".)

Hope this helps,
Ilya
0
Ilya
3/23/2006 12:59:32 AM
In <dvska4$chl$1@trane.wu-wien.ac.at>, on 03/22/2006
   at 11:49 PM, rony <Rony.Flatscher@wu-wien.ac.at> said:

>Hardly either (at those times even mainframe resources were scarce and
>"small machines", even if  there were even smaller machines). Today a
>Linux watch has more horse power and resources than a  mainframe 25 years
>ago, let alone a Windows Smartphone ...

It's all relative.

The first 360 I had direct access to was a 360/30 which max'ed out 64KB of
core.  This was back in the early '70s.  I pretty much had it to myself,
which was fun, but unusual.  My brother worked on a 360/20 which was even
smaller.

When did the first versions of REXX appear?  My recollection is it was
mostly IBM internal until somewhere in the mid to late 80's.  By then the
mainframes I came across typically had several MB or RAM.  This was orders
of magnitude more than the typical micro or mini systems where I did most
of my work at the time, not to mention the embedded boxes.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/23/2006 2:33:59 AM
In <T7NIEJzxPvaD092yn@tin.it>, on 03/22/2006
   at 06:21 AM, @tin.it (Alessandro) said:

>I know what a stem is (that is a sort of array whose elements are
>accessed by keys rather than numeric indexes)

You may think so.  However, there more to stems that just this.  They have
some special properties.  In an expression, the label A. is not a stem, it
is a variable name which may or may not happen to be the member of a stem. 
This is easy to see with

  say a.
  a. ='really'
  a.1 = 'one'
  say a.
  say a.1
  say a.2

>besides that, being an high level language REXX should make programming
>easier and more productive, but with its odd logic it often causes more
>troubles than it solves

I and many others don't find this to be case.  IMO, the key to working
with any language is to understand how it was intended to be used and work
within the paradigm.

>the problem is that it was born as a command shell scripting language and
>all the new features which have been added during the years do not always
>fit well with the original purpose of the language

You will need to provide examples.  The language definition has not
changed in something like 15 years.  I am excluding Object REXX here
because it is not the same language.

>e.g. dealing with hexadecimal numbers is a nightmare (as the format is
>not endian-agnostic)

There are simple solutions for all of this.  This what reverse is for.

>having to use CALL, when a procedure return value is not used, is another
>of the most boring 'features' and is one of the most typical hint of the
>original purpose of the REXX language (they had to use CALL to avoid
>passing the procedure result to the command shell)

I would not call it boring.  It's the way I prefer to call function to let
readers know that the return value is unused.  REXX is hardly unique in
this kind of feature.

>the only good REXX feature is its full integration with the OS...

It's not integrated with the OS.  It is integrated with the command shell
and EPM and dfsee and mesa and DB2 and many other applications that choose
to use it as the basis of an application macro language.  As Mike states,
this was one of the design goals.

IAC, there's no reason to use REXX when it is not the proper choice for
the problem at hand.  For example, REXX stems are a handy associative data
store, but quickly fall over when the stems get too large.  When I know
I'm going to have large numbers of entries in the stem, I write the code
in Perl, which for a large class of problems, can run as fast as compiled
code.

Also, it's not may nature to complain about a language that has not had
any significant new development in over 10 years.

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/23/2006 5:39:42 AM
Ilya Zakharevich wrote:

> LOL!  (Compare this with what you wrote above: "The compiler isn't
> trying to be too clever".)
> 
  Okay, I feel sorry for you that you're using a compiler that's trying 
to be too clever but isn't quite clever enough. Happy now?


         Michal
0
Michal
3/23/2006 6:35:56 AM
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Michal Necasek 
<michaln@prodigy.net>], who wrote in article <glrUf.21359$NS6.9237@newssvr30.news.prodigy.com>:
> > LOL!  (Compare this with what you wrote above: "The compiler isn't
> > trying to be too clever".)

>   Okay, I feel sorry for you that you're using a compiler that's trying 
> to be too clever but isn't quite clever enough. Happy now?

Interesting.  And which compiler this would be?

Yours,
Ilya



0
Ilya
3/23/2006 7:04:45 AM
in 47683 20060323 023359 Steven Levine <steve53@earthlink.bogus.net> wrote:

>When did the first versions of REXX appear?  My recollection is it was
>mostly IBM internal until somewhere in the mid to late 80's.  By then the
>mainframes I came across typically had several MB or RAM.  This was orders
>of magnitude more than the typical micro or mini systems where I did most
>of my work at the time, not to mention the embedded boxes.

I was using an IBM internal use only version in 1979.  I still have a green-line
user guide of version 2.01 from August 1981 (all upper-case!)
0
Bob
3/23/2006 7:58:23 AM
On Wed, 22 Mar 2006 05:21:23 UTC,         @tin.it (Alessandro) wrote:

> the problem is that it was born as a command shell scripting language

Actually, it wasn't.


0
Bob
3/23/2006 8:51:15 AM
On 23 Mar 2006 08:51:15 GMT, Bob Eager wrote:

>On Wed, 22 Mar 2006 05:21:23 UTC,         @tin.it (Alessandro) wrote:
>
>> the problem is that it was born as a command shell scripting language
>
>Actually, it wasn't.
>
>

Was it not a replacement for exec on VM in the first place?

-- 

Regards

Dave Saville

NB Remove -nospam for good email address


0
Dave
3/23/2006 10:21:16 AM
On Thu, 23 Mar 2006 10:21:16 UTC, "Dave Saville" 
<dave@deezee-nospam.org> wrote:

> On 23 Mar 2006 08:51:15 GMT, Bob Eager wrote:
> 
> >On Wed, 22 Mar 2006 05:21:23 UTC,         @tin.it (Alessandro) wrote:
> >
> >> the problem is that it was born as a command shell scripting language
> >
> >Actually, it wasn't.
> >
> >
> 
> Was it not a replacement for exec on VM in the first place?

No, that was in the second place!

The first place was a research project on developing a programming 
language that anyone could use. They did a lot of stuff with people who 
had never programmeed before. I've been looking for the reference but 
can't find it...


0
Bob
3/23/2006 10:24:55 AM
On Wed, 22 Mar 2006 06:21:23 +0100, @tin.it (Alessandro) <> wrote:
> besides that, being an high level language REXX should make programming
> easier and more productive, but with its odd logic it often causes
> more troubles than it solves

I think part of it is that REXX was written with non-programmers, or at
least batch programmers, in mind as the primary user base.  Once you get
really good at REXX (a stage I'm not at yet, but I'm working on it), and
really get your head around how it works, its logic does make sense.

On the other hand, if you're coming from a structured programming
background, with the associated expectation of how a programming language
should behave, REXX can be very odd indeed.


> e.g. dealing with hexadecimal numbers is a nightmare (as the format is not
> endian-agnostic)

I can't argue with that, although I expect there are some tricks I don't
know about.  Part of my problem is that the various C2X, X2C, D2X etc.
functions don't behave in the way I expect.  I've never yet gotten the
hang of them...


> the only good REXX feature is its full integration with the OS...

IMO there are plenty of other good features as well.  For instance, for
quick and powerful manipulation of text, REXX is terrific.  For pre- and
post-processing logic (e.g. wrapped around external programs), it is an
incredibly handy batch language.  And the flexibility of REXX stems just
blows me away.  I mean, in one implementation, you have arrays, data
structures, and dictionaries/hashtables.

Where REXX falls down is in complex manipulation of large amounts of
highly structured data.  But that's the kind of task that compiled
languages were designed for.

REXX is, ultimately, a scripting language.  Not an application language.
For certain types of tasks, I'd argue it's one of the best tools
available.


-------
Incidentally, a small grammatical note regarding your subject: in English,
when using 's***' (assuming the the word is what I think) descriptively,
there's no particle.  That's because it's treated as a substance, rather
than an object (like sand).  So you would say 'Object REXX is s***'.  OR,
alternatively, you can use it as an adjective, as in 'Object REXX is a
s***ty language'.  

This concludes today's lesson in pejorative English.  :)
-------

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/23/2006 4:08:03 PM
Alex Taylor wrote:

> -------
> Incidentally, a small grammatical note regarding your subject: in English,
> when using 's***' (assuming the the word is what I think) descriptively,
> there's no particle.  That's because it's treated as a substance, rather
> than an object (like sand).  So you would say 'Object REXX is s***'.  OR,
> alternatively, you can use it as an adjective, as in 'Object REXX is a
> s***ty language'.  
> 
> This concludes today's lesson in pejorative English.  :)
> -------
> 
  Or, if one likes the indefinite article, "a piece of s***" is also an 
option.


           Michal
0
Michal
3/23/2006 6:13:57 PM
Dave Saville wrote:
> On Tue, 21 Mar 2006 23:40:05 GMT, Steven Levine wrote:
> 
> <snip>
> 
>> There are aspects of REXX syntax I find annoying, but is entirely 
>> consistent.  The design is OK, but in general I prefer languages
>> that help the programmer not make obvious mistakes.
> 
> AIUI REXX was designed to make the REXX programmers task easy. That
> made writing the interpreter hard - but you only do that once :-)

The key to understanding Rexx - and something that is not stated well
enough in the beginners' documentation - is that there is only one data
type, namely the string.  The place where even experienced programmers
go wrong, though, is that the language definition does not clearly
distinguish between the name of a string and the value of a string.
Once stem variables are introduced, it becomes a bit of a nightmare.  I
have found that I can pass a stem variable to a procedure in one project
and then, a few weeks later, have to search through all sorts of
documentation to try to figure out how to do something that I know I
have already successfully done.

Debugging in Rexx should be easy, because it's just a matter of putting
lots of SAY commands at various places.  In practice, however, I find
that I spend more time debugging in Rexx than in any other language.
The SAY can tell you what went wrong, but not why it went wrong.

> C on the other hand was designed to make writing the compiler easy
> and sod the poor programmer.

C had very different design goals.  Rexx, like COBOL, was designed for
people who did not know much about computers or programming.  C was
designed for people who think in machine language.  C combines the power
of assembly language with the readability of assembly language.

-- 
Peter Moylan                             http://www.pmoylan.org

Please note the changed e-mail and web addresses.  The domain
eepjm.newcastle.edu.au no longer exists.
My e-mail addresses at newcastle.edu.au will probably remain "live"
for a while, but then they will disappear without warning.
The optusnet address still has about 5 months of life left.
0
Peter
3/24/2006 1:46:31 AM
In article <T7NIEJzxPvaD092yn@tin.it>,         @tin.it (Alessandro) wrote:

 >the only good REXX feature is its full integration with the OS...

well pure object rexx seems to be more consistent than classic REXX
but the documentation is just unusable and while there are plenty
of free documents about classic REXX I could not find anything about
object REXX (apart that boring car-dealer application example)

there are a lot of one-man designed languages out there with quite
good documentation... I wonder how IBM with all its resources cannot
even produce a decent documentation for its products...

--
bye
Alessandro
0
tin
3/24/2006 4:21:55 AM
In article <4422349e$3$fgrir53$mr2ice@news.west.earthlink.net>,
Steven Levine <steve53@earthlink.bogus.net> wrote:

 >>I know what a stem is (that is a sort of array whose elements are
 >>accessed by keys rather than numeric indexes)
 >
 >You may think so.  However, there more to stems that just this.  They have
 >some special properties.  In an expression, the label A. is not a stem, it
 >is a variable name which may or may not happen to be the member of a stem.
 >This is easy to see with
 >
 >  say a.
 >  a. ='really'
 >  a.1 = 'one'
 >  say a.
 >  say a.1
 >  say a.2

I may be dumb, but IMO rather than a feature, I'd call that bad design:
it adds nothing to usefulness but is just another chance for difficult to
spot errors

 >I and many others don't find this to be case.  IMO, the key to working
 >with any language is to understand how it was intended to be used and work
 >within the paradigm.

that means : use REXX only for short and simple batch scripts ?

 >You will need to provide examples.  The language definition has not
 >changed in something like 15 years.  I am excluding Object REXX here
 >because it is not the same language.

if it were not for the poor documentation (even worst than the classic
REXX one) it would not be so bad compared to classic REXX...
I've been playing with it yesterday and I felt quite at ease...
classic REXX has just too many limitations like unability to return stems
or to pass stems by reference

 >>e.g. dealing with hexadecimal numbers is a nightmare (as the format is
 >>not endian-agnostic)
 >
 >There are simple solutions for all of this.  This what reverse is for.

come on... high level programming language should make life easier
rather than require a 'reverse' for each hex number

 >I would not call it boring.  It's the way I prefer to call function to let
 >readers know that the return value is unused.  REXX is hardly unique in
 >this kind of feature.

what other languages are using that paradigm... something else from the
paleolithic age ? I understand that you may like and prefer REXX to
other languages, but I think it is just because you are so accustomed
to using it, not because it is really so easy and high level...
there are plenty of other languages out there much better than REXX...

 >>the only good REXX feature is its full integration with the OS...
 >
 >It's not integrated with the OS.  It is integrated with the command shell
 >and EPM and dfsee and mesa and DB2 and many other applications that choose
 >to use it as the basis of an application macro language.  As Mike states,
 >this was one of the design goals.

well I intended that

P.S. I do not want to start a flame, so please forgive me if I've been
too harsh, I've nothing against you... it is just that sometimes rexx
upsets me :-)

--
bye
Alessandro
0
tin
3/24/2006 4:50:50 AM
In article <4422c734$0$4849$bb4e3ad8@newscene.com>,
Alex Taylor <mail.me@reply.to.address> wrote:

 >I think part of it is that REXX was written with non-programmers, or at
 >least batch programmers, in mind as the primary user base.  Once you get
 >really good at REXX (a stage I'm not at yet, but I'm working on it), and
 >really get your head around how it works, its logic does make sense.

but classic REXX is a sort of a joke... using only stems to deal with
complex data is a nightmare, besides being quite inefficient (regarding
speed and resources)...
classic REXX does not even allow to pass stem as procedure parameters
or to return stems, you are obliged to make them global variables

 >On the other hand, if you're coming from a structured programming
 >background, with the associated expectation of how a programming language
 >should behave, REXX can be very odd indeed.

only for trivial jobs

 >> e.g. dealing with hexadecimal numbers is a nightmare (as the format is not
 >> endian-agnostic)
 >
 >I can't argue with that, although I expect there are some tricks I don't
 >know about.  Part of my problem is that the various C2X, X2C, D2X etc.
 >functions don't behave in the way I expect.  I've never yet gotten the
 >hang of them...

there are plenty of other scripting languages out there which do not
have such silly restrictions and which are much better than REXX

 >> the only good REXX feature is its full integration with the OS...
 >
 >IMO there are plenty of other good features as well.  For instance, for
 >quick and powerful manipulation of text, REXX is terrific.  For pre- and

its terrificly poor compared with what you can do with python or ruby
and many other modern languages

 >post-processing logic (e.g. wrapped around external programs), it is an
 >incredibly handy batch language.  And the flexibility of REXX stems just
 >blows me away.  I mean, in one implementation, you have arrays, data
 >structures, and dictionaries/hashtables.

they are just dictionaries and like every kind of dictionary you can
use anything to access its elements
and without object REXX new features, dealing with stems in structured
programs longer than 2-300 lines is a real nightmare

IMO classic REXX does nothing to promote good program structuring...
it works better as a simple sequence of statements and I guess that
at the beginning it was designed to do just that

object REXX solves many of the classic REXX problems ... I just wonder
why they did not add the ability to represent hexadecimal numbers in
a more comfortable way... they could have just added the most common
format 0xhhhhhhhh and even 0bnnnnnnnn (for base 2) without problems
as that format does not clash with any of the other kind of tokens

if it were not for its poor documentation it won't be that bad even for
producing complex programs

 >Where REXX falls down is in complex manipulation of large amounts of
 >highly structured data.  But that's the kind of task that compiled
 >languages were designed for.
 >
 >REXX is, ultimately, a scripting language.  Not an application language.
 >For certain types of tasks, I'd argue it's one of the best tools
 >available.

classic REXX is just a very old language which cannot stand in comparison
with the more modern ones which allow you to do almost everything
more easily and more quickly
I've been unfair (to the people who created it) defining it a poorly
designed language... it is just old and was not born to be a general
purpose language...

 >Incidentally, a small grammatical note regarding your subject: in English,

thanks Alex

--
bye
Alessandro
0
tin
3/24/2006 5:14:29 AM
In article <44234f77$0$7530$afc38c87@news.optusnet.com.au>,
Peter Moylan <peter@DIESPAMMERSozebelg.org> wrote:

 >The key to understanding Rexx - and something that is not stated well
 >enough in the beginners' documentation - is that there is only one data
 >type, namely the string.  The place where even experienced programmers
 >go wrong, though, is that the language definition does not clearly
 >distinguish between the name of a string and the value of a string.
 >Once stem variables are introduced, it becomes a bit of a nightmare.  I
 >have found that I can pass a stem variable to a procedure in one project
 >and then, a few weeks later, have to search through all sorts of
 >documentation to try to figure out how to do something that I know I
 >have already successfully done.

yes... it happens to me too... a lot of times...
it also happens when I'm programming in C, but it regards mainly the
syntax of a declaration (e.g. how to typedef a function call) and
I can find the answer quite quickly and easily while most of times,
with REXX, things just do not work as expected and it is really hard
to understand what is going wrong... sometimes it makes you waste a lot of
time... what seems to work flawlessly in some instances completely
fails in a slightly different one

 >Debugging in Rexx should be easy, because it's just a matter of putting
 >lots of SAY commands at various places.  In practice, however, I find
 >that I spend more time debugging in Rexx than in any other language.
 >The SAY can tell you what went wrong, but not why it went wrong.

I agree with that too... interactive tracing is a bit better, but
you have to write a lot of trace on/off statements all around your
source and then comment them all once you are done
and when a variable holds a lot of data you have all those MLE
import error messages if you use PMREXX or unusable data if you are
using a command line window (i.e. the data of the variable will
delete all other useful trace data)

--
bye
Alessandro
0
tin
3/24/2006 5:39:12 AM
In <44234f77$0$7530$afc38c87@news.optusnet.com.au>, on 03/24/2006
   at 12:46 PM, Peter Moylan <peter@DIESPAMMERSozebelg.org> said:

>Debugging in Rexx should be easy, because it's just a matter of putting
>lots of SAY commands at various places.  In practice, however, I find
>that I spend more time debugging in Rexx than in any other language. The
>SAY can tell you what went wrong, but not why it went wrong.

I don't find this the case, but then this might be because I use trace and
rxd to help me debug the code I can't fix by inspection.  Both trace and
rxd make it easy to single step and display variables.  Rxd also has
breakpoints and watches.

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/24/2006 8:39:35 AM
> Where REXX falls down is in complex manipulation of large amounts of
> highly structured data.  But that's the kind of task that compiled
> languages were designed for.

Well, if that comes into the picture, then Object REXX would be a very good option.

---rony


0
rony
3/24/2006 11:36:25 AM
Peter Moylan wrote:

.... cut ...

> Debugging in Rexx should be easy, because it's just a matter of putting
> lots of SAY commands at various places.  In practice, however, I find
> that I spend more time debugging in Rexx than in any other language.
> The SAY can tell you what went wrong, but not why it went wrong.

Well, for debugging Rexx programs the TRACE statement would be intended. E.g. insert a "TRACE ?I" 
before the statement that you want to analyze/understand and you get the intermediate results of 
evaluation the Rexx statement in an interactive environment.

E.g. save and run the following Rexx program:

	a=2
	b=17
	trace ?i
	say "it is:" a*3+17

The output symbols, if in doubt, are also defined in the Rexx documentation.

---rony

0
rony
3/24/2006 11:41:08 AM

Alessandro wrote:
> In article <T7NIEJzxPvaD092yn@tin.it>,         @tin.it (Alessandro) wrote:
> 
>  >the only good REXX feature is its full integration with the OS...
> 
> well pure object rexx seems to be more consistent than classic REXX
> but the documentation is just unusable and while there are plenty
> of free documents about classic REXX I could not find anything about
> object REXX (apart that boring car-dealer application example)
> 
> there are a lot of one-man designed languages out there with quite
> good documentation... I wonder how IBM with all its resources cannot
> even produce a decent documentation for its products...

Well, one thing is clear, the documentation is actually not bad, but it is not too well documented 
where to find it.

When IBM handed over the Object REXX source code to the non-profit SIG "Rexx Language Association" 
(http://www.RexxLA.org) it also supplied the documentation, which now has been rendered to PDF and 
to HTML (http://www.oorexx.org/docs.html).

Probably 95% of the docs still applies to the OS/2 version of Object REXX as well. Just go the 
homepage at <http://www.ooRexx.org>, where you find the free and opensource release of Object REXX 
under the name "Open Object Rexx (ooRexx)".


E.g. the first 100 pages of the following document give an introduction into Object Rexx in a 
tutorial like manner (fully applicable to the OS/2 version): <http://www.oorexx.org/rexxpg.pdf> or 
in HTML <http://www.oorexx.org/rexxpg/book1.htm>.

Or the entire Object REXX reference as a PDF book: <http://www.oorexx.org/rexxref.pdf>, or rendered 
as HTML: <http://www.oorexx.org/rexxref/book1.htm>.

ooRexx itself is available for Linux and Windows among other operating systems (just look at the 
download link on the ooRexx homepage).

HTH,

---rony
0
rony
3/24/2006 11:48:10 AM
in 47712 20060324 051429 @tin.it (Alessandro) wrote:
>
>but classic REXX is a sort of a joke... using only stems to deal with
>complex data is a nightmare, besides being quite inefficient (regarding
>speed and resources)...
>classic REXX does not even allow to pass stem as procedure parameters
>or to return stems, you are obliged to make them global variables
>

Can't agree with you.  I've been using Rexx for almost 30 years and I love it.
I've written huge programs in it, some handling very large amounts of data.
I'm not against modern languages, I like Java and use it a lot, but for any 
non-gui program that is needed quickly Rexx is an automatic choice for me.
0
Bob
3/25/2006 9:03:39 AM
 > object REXX solves many of the classic REXX problems ...
 > I just wonder why they did not add the ability to represent
 > hexadecimal numbers in a more comfortable way...
 
Well, you could always "replace" the existing functions with your own
ones. For example, without suggestion you'ld like such constructions:

     /**/;Say Date();EXIT;Date: RETURN Time()

And I almost wonder why you're wondering about them adding functions,
unless in the future you are the one and only user of your REXX code.

For one, try to visit the oorexx.org-website with Netscape/2. If it's
ever going to be ported to OS/2, possibly including your RFC, will it
become "REXX MYAPP.CMD" or remain just the usual "MYAPP"? Anyway, the
website almost must contain some very important functionality because
the REXX Hyjack Team otherwise succeeded in hiding the OS/2 FAQ-line
from a common OS/2 webbrowser. Great choice, and please keep up the
good work! :-)



---
0
spamgate
3/25/2006 9:27:38 AM
 >> but classic REXX is a sort of a joke... using only stems to deal with
 >> complex data is a nightmare, besides being quite inefficient (regarding
 >> speed and resources)...
 >> classic REXX does not even allow to pass stem as procedure parameters
 >> or to return stems, you are obliged to make them global variables

 > Can't agree with you.
 
When it comes to any speed-related problem, why use an interpreted
language anyway? B/W, but accept it or choose a better solution for
the real job.

 > I've been using Rexx for almost 30 years and I love it.
 > I've written huge programs in it, some handling very large amounts
 > of data. I'm not against modern languages, I like Java and use it
 > a lot, but for any non-gui program that is needed quickly Rexx is
 > an automatic choice for me.
 
FWIW, but you're not really explaining why you didn't agree. Substitute
your "Rexx" with "assembly", and it still means nothing. Or is your Rexx
app started about 30 years ago by you, and you're enjoying that it still
isn't finished? ;-)



---
0
spamgate
3/25/2006 10:11:02 AM
....cut...
> object REXX solves many of the classic REXX problems ... I just wonder
> why they did not add the ability to represent hexadecimal numbers in
> a more comfortable way... they could have just added the most common
> format 0xhhhhhhhh and even 0bnnnnnnnn (for base 2) without problems
> as that format does not clash with any of the other kind of tokens
....cut...

Not sure, what you mean. In (oo)Rexx you could always write (note the trailing 'x' and 'b' right 
after the quotes embedding the string):

	a="0d0a"x	   /* hexadecimal value for CR-LF */
	b="0000110100001010"b	/* binary value for CR-LF */

You could insert blanks for easier readability after bytes or nibbles, e.g.

	b="0000 1101 0000 1010"	/* binary value for CR-LF */


To turn any character(s), ie. string, into hexadecimal you would enter:

	say a~c2x	/* character-to-hexadecimal representation */

To turn any character(s) into a binary digit representation you would enter:

	say a~c2x~x2b

Would this be what you were looking for?

Regards,

---rony

P.S.: Ooops, just noted that I used the Object REXX syntax by mistake (*honestly*!), so here are the 
classic Rexx statements to get at the hexadecimal and binary representation of any string:

	say c2x(a)       /* turn string into a hexadecimal representation  */
	say x2b(c2x(a))  /* turn string into a binary digit representation */
0
rony
3/25/2006 7:53:06 PM
> 
>  >Debugging in Rexx should be easy, because it's just a matter of putting
>  >lots of SAY commands at various places.  In practice, however, I find
>  >that I spend more time debugging in Rexx than in any other language.
>  >The SAY can tell you what went wrong, but not why it went wrong.
> 
> I agree with that too... interactive tracing is a bit better, but
> you have to write a lot of trace on/off statements all around your
> source and then comment them all once you are done
> and when a variable holds a lot of data you have all those MLE
> import error messages if you use PMREXX or unusable data if you are
> using a command line window (i.e. the data of the variable will
> delete all other useful trace data)

Usually you just would want to debug/trace if something is either new (and you want to figure out 
what happens exactly) or there is an (unexpected) error.

In the case of an error you could write an exception handler which turns interactive tracing on 
automatically but only in case of an error, alleviating the need to insert lots of trace statements 
into one's code.

---rony
0
rony
3/25/2006 7:55:12 PM
In article <LH7Vf.28586$u31.5084@newsfe2-win.ntli.net>,
Bob Martin <bob.martin@excite.com> wrote:

 >>but classic REXX is a sort of a joke... using only stems to deal with
 >>complex data is a nightmare, besides being quite inefficient (regarding
 >>speed and resources)...
 >>classic REXX does not even allow to pass stem as procedure parameters
 >>or to return stems, you are obliged to make them global variables
 >
 >Can't agree with you.  I've been using Rexx for almost 30 years and I love it.
 >I've written huge programs in it, some handling very large amounts of data.
 >I'm not against modern languages, I like Java and use it a lot, but for any
 >non-gui program that is needed quickly Rexx is an automatic choice for me.

I understand that from *your* point of view REXX is the best solution

but I think that most people without 30 years of REXX use will find other
scripting languages more comfortable and productive

--
bye
Alessandro
0
tin
3/26/2006 5:05:44 AM
In article <e04735$2l9v$1@trane.wu-wien.ac.at>,
rony <Rony.Flatscher@wu-wien.ac.at> wrote:

 >Not sure, what you mean. In (oo)Rexx you could always write (note the trailing 'x' and 'b' right
 >after the quotes embedding the string):
 >
 >	a="0d0a"x	   /* hexadecimal value for CR-LF */
 >	b="0000110100001010"b	/* binary value for CR-LF */

for instance if I want to use some REXX extension package
to set the style of a PM window to 0xabcdef12 I have to use
"21fedcba"x

now I just started REXXTRY
I wrote
A = "21FEDCBA"X
then
SAY A

of course I did not get 2882400018 but a sequence of 4 ASCII characters
I might well write a REXX extension DLL able to take values like
"0xabcdef12" and then convert to the correct values but in such
case I could not use bitwise logical operators like
style = 0x00020000 | 0x00010000 unless I embed a small interpreter
and make my extension DLL API accept text strings like
"0x00020000 | 0x00010000"

This is quite confusing for people accustomed to REAL programming languages

As REAL programming language I mean a language that, as much as you
like REXX, you are sometimes obliged to use since REXX does not allow
to make all those things you can do with a REAL programming language.
Of course you can use a REXX extension DLL if somebody else created one
suitable for your needs (using a REAL programming language)

I also wondered why, when they designed object REXX, greatly
improving classic REXX, did not make it able to recognize numbers
entered in the common 0xhhhhhhhh format

IMO this small example shows how REXX makes life easier if you just
have to write a small script to perform a bunch of commands or operate
some changes on a text file, but may make it much more complicate if
you have to deal with more complex jobs, while other modern scripting
languages make your life easier in both instances

--
bye
Alessandro
0
tin
3/26/2006 5:12:49 AM
in 47717 20060325 101102 spamgate@hotmai1.com (ML) wrote:
>>> but classic REXX is a sort of a joke... using only stems to deal with
>>> complex data is a nightmare, besides being quite inefficient (regarding
>>> speed and resources)...
>>> classic REXX does not even allow to pass stem as procedure parameters
>>> or to return stems, you are obliged to make them global variables
>
>> Can't agree with you.
>
>When it comes to any speed-related problem, why use an interpreted
>language anyway? B/W, but accept it or choose a better solution for
>the real job.
>
>> I've been using Rexx for almost 30 years and I love it.
>> I've written huge programs in it, some handling very large amounts
>> of data. I'm not against modern languages, I like Java and use it
>> a lot, but for any non-gui program that is needed quickly Rexx is
>> an automatic choice for me.
>
>FWIW, but you're not really explaining why you didn't agree. Substitute
>your "Rexx" with "assembly", and it still means nothing. Or is your Rexx
>app started about 30 years ago by you, and you're enjoying that it still
>isn't finished? ;-)

You're totally missing the point.  I was replying to the comment "classic REXX is
a sort of joke" and saying that on the contrary Rexx is an extremely effective
language for the jobs it was meant for - ask any IBM mainframe programmer.
Condemning a language that you haven't learned to use just makes you look silly.
0
Bob
3/26/2006 7:27:17 AM
In <qq3IEJzxPTZD092yn@tin.it>, on 03/24/2006
   at 05:50 AM, @tin.it (Alessandro) said:

>I may be dumb, but IMO rather than a feature, I'd call that bad design:
>it adds nothing to usefulness but is just another chance for difficult to
>spot errors

We all know you are not dumb,  However, I would ask why you are bothering
to complain about the design of a language, which as others have already
noted, has been essential unchanged for over 10 years?

It is what it is and I would be extremely surprised if the language ever
changes to any significant degree.

That said many folks, myself included, find it useful for a certain class
of problems.  The problems you have had are all easily avoided by just
asking a few questions and learning how others avoid them.  You questions
are not so different from those a beginning pick your language programmer
might ask about his/her problems with a new language.

>that means : use REXX only for short and simple batch scripts ?

Not in my case.  That's what I use 4OS2 for.  When I need better string
handling than 4OS2 can provide, I tend to use REXX.  If I intend to
distribute the script, I tend to use Classic REXX rather than Object REXX. 
If the alogrithm requires more than REXX can provide I use something else. 
All of this applies only to eCS/OS2.  On Unix boxes, I have a different
set of choices.

>I've been
>playing with it yesterday and I felt quite at ease... classic REXX has
>just too many limitations like unability to return stems or to pass stems
>by reference

Object REXX has some advantages over Classic REXX, but there are also
costs.  Not everybody runs OREXX, so if you are planning to distribute
your apps, this can be a problem.  Also, you will find OREXX make heavy
use of shared memory.

>come on... high level programming language should make life easier rather
>than require a 'reverse' for each hex number

The first implementations were on mainframes with big-endian numbers and
the EBCDIC character set.  Some of these folks might say it's the PC's
fault for getting it backwards.  IAC, the language was not designed for
low-level bit twiddling.  It's got features that can get the job done, but
if you need heavy bit twiddling for an app, you probably should be using a
different language.

>what other languages are using that paradigm... something else from the
>paleolithic age ?

This was a design choice.  Since the language was intended to be an
embedded macro language for other applications, they needed a way to pass
data back to the application.  Since the belief was that this would be
done more often than not, it was made the default.  Makes sense to me.

>I understand that you may like and prefer REXX to other
>languages, but I think it is just because you are so accustomed to using
>it, not because it is really so easy and high level... there are plenty
>of other languages out there much better than REXX...

A more accurate statement would be that I choose REXX when it fits the
needs of the application.  On eCS/OS2 I probably do most of my scripting
in 4OS2 or Perl.

>P.S. I do not want to start a flame, so please forgive me if I've been
>too harsh, I've nothing against you... it is just that sometimes rexx
>upsets me :-)

My POV is life is short.  I just can't see getting upset over a
programming language. ;-)

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/26/2006 5:39:39 PM
In <2cRJElQNAR9b090yn@hotmai1.com>, on 03/25/2006
   at 12:11 PM, spamgate@hotmai1.com (ML) said:

>When it comes to any speed-related problem, why use an interpreted
>language anyway? B/W, but accept it or choose a better solution for the
>real job.

My experience is performance related problems are caused, more often than
not, by choice of algorithm rather than choice of language.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/26/2006 5:45:40 PM
Steven Levine wrote:

> We all know you are not dumb,  However, I would ask why you are bothering
> to complain about the design of a language, which as others have already
> noted, has been essential unchanged for over 10 years?
> 
  That's what I was wondering about - if REXX is so horrible (and surely 
that is in the eye of the beholder), why not just use some other 
language? Is someone forcing Alessandro to use REXX at gunpoint?


         Michal
0
Michal
3/26/2006 7:03:49 PM
 >> When it comes to any speed-related problem, why use an interpreted
 >> language anyway? B/W, but accept it or choose a better solution for the
 >> real job.

 > My experience is performance related problems are caused, more often
 > than not, by choice of algorithm rather than choice of language.
 
I wasn't trying to suggest that one shouldn't take a look at optimizing
algorithms! :-) But OTOH optimizing doesn't fit the design REXX very
well, just like possibly faster OREXX apps become unreadable too when
"your mother" has to understand the aps too. Besides that, the speed
gain of some apps using a compiler instead of an interpreter cannot
be beaten by a better algorith.

I've apps which run for more than a day, which caused so many problem
that IBM actually fixed related some issues. I'm quite sure that the
same apps written in C would take no longer than about a minute to
complete, using the same algoritm. In the end I should be comfortable
(I am) with taking it, including unavoidable heavy file-I/O, more than
a day to complete, or otherwise by far C (and/or REXX DLL's) would be
a better choice. Then the REXX app would just be a Q&D prototype, just
another common use of REXX.



---
0
spamgate
3/26/2006 8:34:07 PM
Alessandro wrote:

> of course I did not get 2882400018 but a sequence of 4 ASCII characters

That would be the feature of an 'integer' type, but Rexx has only 
strings..

-- 
Veit Kannegieser
0
Veit
3/27/2006 9:07:30 AM
Alessandro wrote:
> In article <e04735$2l9v$1@trane.wu-wien.ac.at>,
> rony <Rony.Flatscher@wu-wien.ac.at> wrote:
> 
>  >Not sure, what you mean. In (oo)Rexx you could always write (note the trailing 'x' and 'b' right
>  >after the quotes embedding the string):
>  >
>  >	a="0d0a"x	   /* hexadecimal value for CR-LF */
>  >	b="0000110100001010"b	/* binary value for CR-LF */
> 
> for instance if I want to use some REXX extension package
> to set the style of a PM window to 0xabcdef12 I have to use
> "21fedcba"x
> 
> now I just started REXXTRY
> I wrote
> A = "21FEDCBA"X
> then
> SAY A
> 
> of course I did not get 2882400018 but a sequence of 4 ASCII characters

No, you *got* what you asked for!

> I might well write a REXX extension DLL able to take values like
> "0xabcdef12" and then convert to the correct values but in such

Again, please be aware that you already achieved what you were looking for!

> case I could not use bitwise logical operators like
> style = 0x00020000 | 0x00010000 unless I embed a small interpreter
> and make my extension DLL API accept text strings like
> "0x00020000 | 0x00010000"

No need for a DLL here either, just started "rexxtry.cmd" and entered:

v1="00020000"x;v2="00010000"x;v3=bitor(v1, v2)
   ........................................... rexxtry.rex
say x2b(c2x(v1))
00000000000000100000000000000000
   ........................................... rexxtry.rex
say x2b(c2x(v2))
00000000000000010000000000000000
   ........................................... rexxtry.rex
say x2b(c2x(v3))
00000000000000110000000000000000
   ........................................... rexxtry.rex

As you can see the binary integer (consisting of four consecutive bytes, usually layed out on a 
machine word-border in the registers) values can be ored (|) with each other. The effects can be 
seen by turning the character values into their bit-representations as seen above.

> This is quite confusing for people accustomed to REAL programming languages

Well, people with "REAL" programming languages like C (?) would probably realize the physical 
representation of data of types integer (and hence would be able to infer that four consecutive 
bytes are indeed what is used for an int).

> > As REAL programming language I mean a language that, as much as you
> like REXX, you are sometimes obliged to use since REXX does not allow
> to make all those things you can do with a REAL programming language.

Again, what would be a "REAL" programming language in your eyes? Personally, I can code (at least 
*used* to be able to code) in 370 Assembler, Intel Assembler, BASIC, COBOL, C, C++, C#, DBASE, Java, 
Pascal, PROLOG, REXX, RPG, Visual Basic and a few other, unknown (like FORMULA) ones.

But then, although I like REXX and Object REXX a lot for various reasons, I would not always pick 
it, if other languages help me solve the problem at hand in a better way (whatever "better" means in 
the decision context).

> Of course you can use a REXX extension DLL if somebody else created one
> suitable for your needs (using a REAL programming language)

Indeed, you can extend the functionality of REXX by creating external function libraries (in a much 
standardized way).

> I also wondered why, when they designed object REXX, greatly
> improving classic REXX, did not make it able to recognize numbers
> entered in the common 0xhhhhhhhh format

Well, if you looked up the documentation you would have probably been able to find out that indeed 
you could write down hexadecimal string literals.

> IMO this small example shows how REXX makes life easier if you just
> have to write a small script to perform a bunch of commands or operate
> some changes on a text file, but may make it much more complicate if
> you have to deal with more complex jobs, while other modern scripting
> languages make your life easier in both instances

No, that is not the case at all. It always depends on the problem at hand (on the context) to be 
able to judge which programming language would be best to solve it.

---

REXX has many advantages in quite a few use cases, that other languages do not have. For me one 
important aspect is, that its syntax is easy (looks almost like pseudo code). Another one is, that 
the language's built in functions (BIFs) have remained very concise in the past 25 years (no 
function extension galore like Visual Basic, which therefore cannot be memorized in full by coders).

Object REXX in addition is a very nice iteration of REXX adding a Smalltalk like object-oriented 
paradigm (crossed a little bit with C++ BTW) and still keeping the syntax simple.

Especially on OS/2 with SOM and DSOM the benefits of Object REXX can be easily seen. There is 
nothing that would match the easiness of Object REXX using D/SOM, really nothing!

The Windows version of Object REXX allows taking advantage of OLE/ActiveX (actually there it is a 
full blown "Windows Script Engine", meaning that wherever you can use VBScript you could use Object 
REXX instead).

The BSF4Rexx package is another example showing off the power of Object REXX as that allows 
interfacing with Java objects as if they were Object Rexx objects.

Again, the problem determines what tools solve it the best. In my case, many times it is REXX and 
Object REXX. YMMV.

---rony

0
rony
3/27/2006 9:43:20 AM
 > now I just started REXXTRY
 > I wrote
 > A = "21FEDCBA"X
 > then
 > SAY A

 > of course I did not get 2882400018 but a sequence of 4 ASCII characters
 
What about adding C2D(A) to the mix?



---
0
spamgate
3/27/2006 11:01:44 AM
In article <4426d1dc$1$fgrir53$mr2ice@news.west.earthlink.net>,
Steven Levine <steve53@earthlink.bogus.net> wrote:

 >My POV is life is short.  I just can't see getting upset over a
 >programming language. ;-)

that is because I like 90 % of REXX but that 10 % I do not like
really bores me :-)

....it looks like I'll have to write my own programming language :-)

--
bye
Alessandro
0
tin
3/27/2006 1:17:04 PM
In article <pABVf.7805$m4.1983@newssvr33.news.prodigy.com>,
Michal Necasek <michaln@prodigy.net> wrote:

 >  That's what I was wondering about - if REXX is so horrible (and surely
 >that is in the eye of the beholder), why not just use some other
 >language? Is someone forcing Alessandro to use REXX at gunpoint?

it is just because it is so integrated with the OS and there are
so many libraries...
what I cannot really stand about REXX (and OS/2) is that sort of
half finished feeling... that is it is almost perfect but those
things that make them less than perfect are really boring... :-)

--
bye
Alessandro
0
tin
3/27/2006 1:20:49 PM
ML wrote:
>  > now I just started REXXTRY
>  > I wrote
>  > A = "21FEDCBA"X
>  > then
>  > SAY A
> 
>  > of course I did not get 2882400018 but a sequence of 4 ASCII characters
>  
> What about adding C2D(A) to the mix?


Right!

  A = "21FEDCBA"X;
  say a      /* as a string of four bytes */
  !■▄║

  say c2d(a) /* the decimal number value  */
  570350778

  say x2b(c2x(a)) /* the binary value     */
  00100001111111101101110010111010


---rony
0
rony
3/27/2006 5:25:31 PM
On Sun, 26 Mar 2006 05:05:44 UTC,         @tin.it (Alessandro) wrote:

> In article <LH7Vf.28586$u31.5084@newsfe2-win.ntli.net>,
> Bob Martin <bob.martin@excite.com> wrote:
> 
>  >>but classic REXX is a sort of a joke... using only stems to deal with
>  >>complex data is a nightmare, besides being quite inefficient (regarding
>  >>speed and resources)...
>  >>classic REXX does not even allow to pass stem as procedure parameters
>  >>or to return stems, you are obliged to make them global variables
>  >
>  >Can't agree with you.  I've been using Rexx for almost 30 years and I love it.
>  >I've written huge programs in it, some handling very large amounts of data.
>  >I'm not against modern languages, I like Java and use it a lot, but for any
>  >non-gui program that is needed quickly Rexx is an automatic choice for me.
> 
> I understand that from *your* point of view REXX is the best solution
> 
> but I think that most people without 30 years of REXX use will find other
> scripting languages more comfortable and productive
> 
No. As a simple sample: as very little child you had learned to put on
laced shoes as an difficult process. Now you does that without waste 
an idea on it.

The same is with REXX. It can be very difficult to get it - but once 
you learned to understund it it is much easier than any other 
language.

The most important points:
1. rexx knows nothing about keywords, anything is a string
2. rexx knows nothing about fixed or floating point but does math very
well
3. rexx rexx makes anything with strings you can dream of
4. rexx knows nothing about arrays but you can use even 
multidimensional ones
5. rexx is easy to learn
.....

-- 
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
0
Herbert
3/27/2006 9:03:10 PM
 >>> A = "21FEDCBA"X
 >>> SAY A

 >>> of course I did not get 2882400018 but a sequence of 4 ASCII characters

 >> What about adding C2D(A) to the mix?

 > Right!
 > A = "21FEDCBA"X;
 >  say c2d(a) /* the decimal number value  */
 >  570350778
 
FWIW, with his value...

   REXXTRY NUMERIC DIGITS 10;SAY D2X(2882400018)
   
.... the result is equal to Reverse("21FEDCBA"). That looks like
a mistake to me, having "BADCFE21"X (4 bytes, in reverse order)
in mind.



---
0
spamgate
3/27/2006 11:14:07 PM
 > FWIW, with his value ...

 > REXXTRY NUMERIC DIGITS 10;SAY D2X(2882400018)
   
 > ... the result is equal to Reverse("21FEDCBA"). That looks like
 > a mistake to me, having "BADCFE21"X (4 bytes, in reverse order)
 > in mind.

Just 2B complete:

    REXXTRY SAY C2X(Reverse(X2C("21FEDCBA")))

The same, using the original "a=..."-hexadecimal declaration:

    REXXTRY a='21FEDCBA'x;a=Reverse(a);SAY C2X(a)

Again using the "a=...", leaving out the second "a=...":

    REXXTRY a='21FEDCBA'x;SAY C2X(Reverse(a))

Expected output: "BADCFE21" (hex) instead of "ABCDEF12"/2882400018 (oct)
Using OREXX: (oct)~"ABCDEF12"/2882400018~of~instead~(hex)~"BADCFE21" ;-)



---
0
spamgate
3/27/2006 11:55:11 PM
Alessandro,

> but classic REXX is a sort of a joke... using only stems to deal with
> complex data is a nightmare, besides being quite inefficient (regarding
> speed and resources)...


nope, years ago I did some tests - crexx was even faster than orexx 
(at least in my environment). It takes less resources, too. Read also 
Steves hint about the shared memory usage of orexx.

BTW, I think orexx drives the concept of 'easy to use language for end
users' ad absurdum. It turns rexx into a non intuitive style, one 
could use each other language instead. The good thing with the orexx 
interpreter in practice is that some bugs get fixed, and its possible 
to run crexx code with it. 

One big adavantage of rexx on eCs/os2 is that it is some kind of 
standard, used by a lot of applications incl. OS/WPS itself as 
scripting language.

kind regards
-- 
Frank Wochatz
0
Frank
3/28/2006 7:14:43 AM
In <QX+JEJzxPvLW092yn@tin.it>, on 03/27/2006
   at 02:17 PM, @tin.it (Alessandro) said:

>that is because I like 90 % of REXX but that 10 % I do not like really
>bores me :-)

>....it looks like I'll have to write my own programming language :-)

That's always an option.  Which reminds me, how's the RAD GUI Builder
coming along?

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/28/2006 9:46:55 AM
On Fri, 24 Mar 2006 06:14:29 +0100, @tin.it (Alessandro) <> wrote:
> >I think part of it is that REXX was written with non-programmers, or at
> >least batch programmers, in mind as the primary user base.  Once you get
> >really good at REXX (a stage I'm not at yet, but I'm working on it), and
> >really get your head around how it works, its logic does make sense.
>
> but classic REXX is a sort of a joke... using only stems to deal with
> complex data is a nightmare, besides being quite inefficient (regarding
> speed and resources)...

Well, that's kind of true... but again, REXX is designed for scripting
jobs, not really for manipulating extremely large & complex data
structures.

> classic REXX does not even allow to pass stem as procedure parameters
> or to return stems, you are obliged to make them global variables

There is actually a way to pass stems as parameters (sort of) in classic
REXX, but it's convoluted and rather tricky.  And not documented anywhere
official, AFAIK.  (It depends on using EXPOSE and a doubly-nested function
together with the ability of REXX to treat variable names as values.  I
can produce an example if you like.  The REXX Tips & Tricks document
touches on it as well, although not very clearly IMO.)


> >IMO there are plenty of other good features as well.  For instance, for
> >quick and powerful manipulation of text, REXX is terrific.  For pre- and
>
> its terrificly poor compared with what you can do with python or ruby
> and many other modern languages

Yes, but AFAIK those languages are really designed for knowledgeable
programmers.  REXX is designed to use an almost 'natural language' syntax
and style, with non-programmers specifically in mind.


> they are just dictionaries and like every kind of dictionary you can
> use anything to access its elements
> and without object REXX new features, dealing with stems in structured
> programs longer than 2-300 lines is a real nightmare

I wrote a crude IMAP mail client in classic REXX (well, using VX-REXX).  
Its main problem is sluggishness, but that's actually more in the GUI
processing than in the underlying logic.

I grant you that it got quite difficult to keep track of how I was
manipulating the data stems, since they got very complex at times.

I didn't take it any further than simple main reading and folder
management, because I'd pretty much reached the complexity limit of a REXX
program (without driving me insane, that is).  That, and it had served its
purpose of teaching me how IMAP works.


> IMO classic REXX does nothing to promote good program structuring...
> it works better as a simple sequence of statements and I guess that
> at the beginning it was designed to do just that

I believe REXX originated in the mainframe world.  As you may be aware,
the unifying metaphor of IBM's mainframe operating system is that "all
processing is batch".


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/28/2006 5:12:03 PM
in 47817 20060328 181203 Alex Taylor <mail.me@reply.to.address> wrote:

>I believe REXX originated in the mainframe world.  As you may be aware,
>the unifying metaphor of IBM's mainframe operating system is that "all
>processing is batch".

Rexx originated on VM/CMS (in the late 70s) where the concept of batch doesn't really exist
(except for the CMSBATCH virtual machine which wasn't widely used).

It was ported to TSO some years later : TSO is the interactive part of MVS which
is a batch system.

The OS/2 version of Rexx was originally a private project by the great Sam Detweiler.
0
Bob
3/28/2006 7:12:52 PM
In <44296db0$0$4909$bb4e3ad8@newscene.com>, on 03/28/2006
   at 11:12 AM, Alex Taylor <mail.me@reply.to.address> said:

>There is actually a way to pass stems as parameters (sort of) in classic
>REXX, but it's convoluted and rather tricky.  And not documented anywhere
>official, AFAIK.  (It depends on using EXPOSE and a doubly-nested
>function together with the ability of REXX to treat variable names as
>values.  I can produce an example if you like.  The REXX Tips & Tricks
>document touches on it as well, although not very clearly IMO.)

It's easy to pass global stems by name with expose.  It's a bit harder to
pass stems as an argument, but not all that hard.  As you say, it requires
using interpret.

  byexpose: procedure expose stem.
    blah...
    ndx = 'where'
    stem.ndx = 'what'
    return
    
  asarg: procedure

    parse arg stem
    if right(stem,1) \= '.' stem = stem'.'
    ndx = 'where'
    data = 'what'
    interpret  'stem'ndx '= data'

Interpret is slow, but you really have to invoke it a lot before this
becomes a real life problem.

>REXX is designed to use an almost 'natural language' syntax
>and style, with non-programmers specifically in mind.

I think fact that the language is interpreted is what helps
non-programmers the most.

>I grant you that it got quite difficult to keep track of how I was
>manipulating the data stems, since they got very complex at times.

This is what comments are for. :-)

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/28/2006 7:55:21 PM
In article <e08c3r$ea2$1@trane.wu-wien.ac.at>,
rony <Rony.Flatscher@wu-wien.ac.at> wrote:

 >> of course I did not get 2882400018 but a sequence of 4 ASCII characters
 >
 >No, you *got* what you asked for!

well I'll try to be more clear

in REXX I can use:
a = "16"; say a + 2;

and get 18

but I cannot use

a = "10"x; say a + 2;
which yields a bad arithmetic conversion error

I understand the usefulness of the ""x string format as I often use
nl = "0d0a"x or tab = "09"x in my scripts
I also understand that converting hex numbers in the format 0xhhhhhhhh
automatically to string in decimal format (i.e. interpreting 0x10 as "16")
would be inconsistent with REXX as it should translate everything to
text strings, but that would make programming much easier.

And if such consistency is so important then I do not understand why
such automatic translation to a text string is not applied to stem
variables in function calls, but enclosing the name of the stem is
instead required

Another problem due to the lack of representation of numbers in
hexadecimal format is that you cannot be sure what an external
REXX extension library may use:

- it might allow to enter the hex number as a text string and do
  the conversion itself :
  call foo "abcdef12"
- it might require to enter just a decimal value:
  call foo 2882400018
- it might just convert the raw value via a cast
  call foo "12efcdab"x
- it might just convert the raw value doing endian reversing itself
  call foo "abcdef12"x

it is always possible to get the needed information from the library
documentation (provided that it be clear and easy to find) but that
is yet another waste of time if you do not use that library often and
have to look for the documentation each time you need to use it

and last but not the least there are problems coming from the default
numeric digit settings too:

say c2d("10"x)         >> 16
say c2d("ffffffff"x)   >> Incorrect call to method

as much as you like REXX you should admit that it does not make
dealing with hex numbers so comfortable as other scripting languages do

 >> I also wondered why, when they designed object REXX, greatly
 >> improving classic REXX, did not make it able to recognize numbers
 >> entered in the common 0xhhhhhhhh format
 >
 >Well, if you looked up the documentation you would have probably been able to find out that indeed
 >you could write down hexadecimal string literals.

I'm unsure about the meaning of your statement
I've checked both the object REXX reference of the open object REXX project
and the document included with OS/2-eCS but failed to find anything else
than number representation in decimal format and text string representation
in hex format

 >No, that is not the case at all. It always depends on the problem at hand (on the context) to be
 >able to judge which programming language would be best to solve it.

what is frustrating is when REXX would be a perfect language for a given
job apart for those little glitches

 >Again, the problem determines what tools solve it the best. In my case, many times it is REXX and
 >Object REXX. YMMV.

I agree... but IMO REXX would solve more problems and more easily if it
were able to deal with hex numbers in a more comfortable way, did
not require the name of stem variables to be enclosed between quotes,
were always case insensitive (or even sensitive - i.e. at least were
consistent regarding that)

--
bye
Alessandro
0
tin
3/29/2006 3:30:12 AM
In article <hnJ1V440825y-pn2-Qjjdy1rcNd5E@localhost>,
"Frank Wochatz" <frankwochatz@despammed.com> wrote:

 >> but classic REXX is a sort of a joke... using only stems to deal with
 >> complex data is a nightmare, besides being quite inefficient (regarding
 >> speed and resources)...
 >
 >nope, years ago I did some tests - crexx was even faster than orexx
 >(at least in my environment). It takes less resources, too. Read also
 >Steves hint about the shared memory usage of orexx.

you are probably right, but OREXX offers other collection classes
which should be more efficient than stems (e.g. array, lists, etc.)
since do not use text string indexing

besides that OREXX adds essential features like the ability to use
stem variable as function parameters and as function return values

 >One big adavantage of rexx on eCs/os2 is that it is some kind of
 >standard, used by a lot of applications incl. OS/WPS itself as
 >scripting language.

agreed

--
bye
Alessandro
0
tin
3/29/2006 4:42:54 AM
In article <4429060f$5$fgrir53$mr2ice@news.west.earthlink.net>,
Steven Levine <steve53@earthlink.bogus.net> wrote:

 >That's always an option.  Which reminds me, how's the RAD GUI Builder
 >coming along?

slowly... too much slowly... you are right I should stop complaining
and use the little time I have to code :-)

--
bye
Alessandro
0
tin
3/29/2006 4:46:12 AM
In article <44296db0$0$4909$bb4e3ad8@newscene.com>,
Alex Taylor <mail.me@reply.to.address> wrote:

 >Yes, but AFAIK those languages are really designed for knowledgeable
 >programmers.  REXX is designed to use an almost 'natural language' syntax
 >and style, with non-programmers specifically in mind.

you are right... such feature is essential for a language to be used
as application scripting language (as one of its goals)

[...]
 >I believe REXX originated in the mainframe world.  As you may be aware,
 >the unifying metaphor of IBM's mainframe operating system is that "all
 >processing is batch".

.... I'm aware there are a lot of things I'm not aware about :-)

--
bye
Alessandro
0
tin
3/29/2006 4:47:45 AM
Alessandro wrote:
> In article <e08c3r$ea2$1@trane.wu-wien.ac.at>,
> rony <Rony.Flatscher@wu-wien.ac.at> wrote:
> 
>  >> of course I did not get 2882400018 but a sequence of 4 ASCII characters
>  >
>  >No, you *got* what you asked for!
> 
> well I'll try to be more clear
> 
> in REXX I can use:
> a = "16"; 

You just created a string value with the content "16", which happens to be interpretable for humans 
as a decimal number, assigned to variable "a". At this point Rexx does not care at all, whether "a" 
happens to point to a string that could be interpreted as a decimal number.


 > say a + 2;

As this Rexx statement wants Rexx to carry out an arithmetic operation, Rexx will check, whether 
variable "a" contains a decimal number. If it is not, then an error to that effect will be 
generated, else the operation is carried out.

> and get 18

Yes.


> but I cannot use
> 
> a = "10"x; 

"10"x does not yield a string containing character(s) that could be interpreted as (a) decimal 
number(s).

 > say a + 2;

So now Rexx checks whether you "a" refers to a string which can be interpreted as a decimal number. 
Clearly "a" does not consist of the characters "0" through "9" (the decimal digits), so it is not 
regarded as a decimal number.

> which yields a bad arithmetic conversion error

Yes, "a" does not point to a string representing a decimal number.

The decimal *value* of "10"x would be "16": say c2d(a)

The hexadecimal string value of "10"x would be "10": say c2x(a)

But now ask yourself the question: what would you expect Rexx to do? Should it use "16" or "10" or 
should it refuse to interpret the value as a decimal string, as clearly the value of "a" does *not* 
represent a decimal number at all!


> I understand the usefulness of the ""x string format as I often use
> nl = "0d0a"x or tab = "09"x in my scripts
> I also understand that converting hex numbers in the format 0xhhhhhhhh
> automatically to string in decimal format (i.e. interpreting 0x10 as "16")
> would be inconsistent with REXX as it should translate everything to
> text strings, but that would make programming much easier.

Well, which representation should Rexx reliably pick then?

The simplest is: if a string contains characters which to humans occur to be a decimal number, then 
- and only then - allow carrying out decimal arithmetics on it. This rule may not be the one you 
would like/wish, but it is a simple rule that could be even understood by people who are not trained 
to be professional programmers.


> And if such consistency is so important then I do not understand why
> such automatic translation to a text string is not applied to stem
> variables in function calls, but enclosing the name of the stem is
> instead required

Ad passing stems by reference: this has only become possible with Object REXX (and roo! for that 
matter AFAICT). There you would need to use

    USE ARG myStem.

instead of the "PARSE ARG" statement. As other have noted, Object REXX can be used without using its 
object-oriented features at all! One very handy feature of it is, that stems can be passed by 
reference, finally!


> Another problem due to the lack of representation of numbers in
> hexadecimal format is that you cannot be sure what an external
> REXX extension library may use:
> 
> - it might allow to enter the hex number as a text string and do
>   the conversion itself :
>   call foo "abcdef12"

This call would clearly be a string containing some sequence of letters, where no one would be able 
to know upfront, how to interpret it as a number for instance.


> - it might require to enter just a decimal value:
>   call foo 2882400018

This call in Rexx would pass a string "2882400018" which can be used in decimal arithmetics as it 
contains a decimal number.

> - it might just convert the raw value via a cast
>   call foo "12efcdab"x

In this case you would pass a string of *four* characters which cannot be interpreted as a decimal 
number, hence it would not be possible to use it in arithmetic operations:

     say "123fcdab"x


> - it might just convert the raw value doing endian reversing itself
>   call foo "abcdef12"x

Hmm, how would you be able to come up with a (simple) rule that would clearly determine how an 
arbitrary string should be intepreted/manipulated?

In Rexx strings are *never* changed by the interpreter. You - as the programmer - must explicitly 
demand changing the content of strings! This way no unexpected side-effects can occur.

If you can interpret an arbitrary string as a hexadecimal, endian-reversed string, then your 
particular knowledge about this implementation detail would enable you to use the appropriate 
functions in Rexx to endian-reverse it and turn it into a decimal number string.

The Rexx interpreter would hardly be able to correctly guess what the coders meant with their string 
values.


> it is always possible to get the needed information from the library
> documentation (provided that it be clear and easy to find) but that
> is yet another waste of time if you do not use that library often and
> have to look for the documentation each time you need to use it

I think it has mostly to do with the paradigms one has learned. E.g. C-paradigm is very different 
from the PROLOG one, or from the Smalltalk one, or from the Visual BASIC one, - or from the Rexx one.


> and last but not the least there are problems coming from the default
> numeric digit settings too:
> 
> say c2d("10"x)         >> 16
> say c2d("ffffffff"x)   >> Incorrect call to method

Yes and no. Try instead:

    say c2d("ffffffff"x, 4)  /* you'll get -1 */

Of course it is necessary to look up the definitions of the functions one uses. In the case of Rexx 
all arithmetic decimal number conversions are carried out with 9 digits. If that is not sufficient 
for your particular conversion then you can increase the number of digits Rexx should use, e.g.:

	numeric digits 20
	  ........................................... rexxtry.rex
	say c2d("ffffffff"x, 4)
	-1
	  ........................................... rexxtry.rex
	say c2d("ffffffff"x)
	4294967295
	  ........................................... rexxtry.rex


> as much as you like REXX you should admit that it does not make
> dealing with hex numbers so comfortable as other scripting languages do

Again, it is a question of the paradigm of the language. At times (when tackling bit-operation 
problems) I wished for the bit shift operators ">>", "<<" from other languages, OTOH it really 
didn't hinder me to achieve what I wanted.

Or look at "a++" which in Rexx needs to be explicitly stated as "a=a+1".

So I would say that about 99.9% of my needs with hexadecimal/bit numbers are sufficiently covered by 
the means Rexx has on board.


>  >> I also wondered why, when they designed object REXX, greatly
>  >> improving classic REXX, did not make it able to recognize numbers
>  >> entered in the common 0xhhhhhhhh format
>  >
>  >Well, if you looked up the documentation you would have probably been able to find out that indeed
>  >you could write down hexadecimal string literals.
> 
> I'm unsure about the meaning of your statement
> I've checked both the object REXX reference of the open object REXX project
> and the document included with OS/2-eCS but failed to find anything else
> than number representation in decimal format and text string representation
> in hex format

Oh, I see. Yes, in Rexx you have only strings available to you, so decimal numbers must be 
represented as a string of digit characters.

In Object REXX you *could* create your own number representations with all the operations going with 
it. As a matter of fact there are examples on how one can define complex numbers and use them in 
addition, subtraction, multiplication and division operations!


>  >No, that is not the case at all. It always depends on the problem at hand (on the context) to be
>  >able to judge which programming language would be best to solve it.
> 
> what is frustrating is when REXX would be a perfect language for a given
> job apart for those little glitches

Hmm, if the glitches are "little", then it is not a problem (at least for me) in pragmatic terms. If 
they are not "little" then for the problem at hand another language might be better suited.


>  >Again, the problem determines what tools solve it the best. In my case, many times it is REXX and
>  >Object REXX. YMMV.
> 
> I agree... but IMO REXX would solve more problems and more easily if it
> were able to deal with hex numbers in a more comfortable way, did
> not require the name of stem variables to be enclosed between quotes,
> were always case insensitive (or even sensitive - i.e. at least were
> consistent regarding that)

The passing stems by reference is solved with Object Rexx.

Object Rexx would allow you to add additional datatypes (each class you define is actually the 
implementation of a datatype) so to make you able to possibly remove those problems you are not 
happy with that you classify as "glitches". (It is even possible to redefine the ooRexx operators, 
very much like C++ allows for.)

Regards,

---rony




0
rony
3/29/2006 9:19:44 AM
On Tue, 28 Mar 2006 19:55:21 GMT, Steven Levine
<steve53@earthlink.bogus.net> wrote:
> It's easy to pass global stems by name with expose.  It's a bit harder to
> pass stems as an argument, but not all that hard.  As you say, it requires
> using interpret.
>
>   asarg: procedure
>
>     parse arg stem
>     if right(stem,1) \= '.' stem = stem'.'
>     ndx = 'where'
>     data = 'what'
>     interpret  'stem'ndx '= data'

I don't think that's quite the same way I do it, but it's probably a
similar basic idea.


>>I grant you that it got quite difficult to keep track of how I was
>>manipulating the data stems, since they got very complex at times.
>
> This is what comments are for. :-)

OK, I phrased that poorly.  It wasn't what I was _doing_ that was 
giving me trouble.  It was trying to figure out the best way of
_adding_ new logic to an already convoluted process.

IMAP is not an easy protocol to implement.  It basically requires
use of a dictionary structure, which fortunately REXX provides quite
seamlessly, but the problem is effective bounds checking -- which 
I found more or less impossible to do.  So making an error is 
unbelievably easy.  (I was hindered by the fact that SIGNAL ON NOVALUE
apparently doesn't work under VX-REXX.)  It also requires use of
multiple threads.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/29/2006 3:42:05 PM
On Tue, 28 Mar 2006 19:12:52 GMT, Bob Martin <bob.martin@excite.com> wrote:
>>I believe REXX originated in the mainframe world.  As you may be aware,
>>the unifying metaphor of IBM's mainframe operating system is that "all
>>processing is batch".
>
> Rexx originated on VM/CMS (in the late 70s) where the concept of batch
> doesn't really exist (except for the CMSBATCH virtual machine which
> wasn't widely used).
>
> It was ported to TSO some years later : TSO is the interactive part of
> MVS which is a batch system.
>
> The OS/2 version of Rexx was originally a private project by the great Sam Detweiler.

Interesting.  I stand corrected.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/29/2006 3:42:07 PM
In article <e0djfh$c8o$1@trane.wu-wien.ac.at>,
rony <Rony.Flatscher@wu-wien.ac.at> wrote:

hi rony I'm afraid you completely misunderstood my article

 >> in REXX I can use:
 >> a = "16";
 >
 >You just created a string value with the content "16", which happens to be interpretable for humans
 >as a decimal number, assigned to variable "a". At this point Rexx does not care at all, whether "a"
 >happens to point to a string that could be interpreted as a decimal number.

no need for an explanation I know what I did and what to expect I just
wanted to point out what are the limits of REXX

[...]
 >> I understand the usefulness of the ""x string format as I often use
 >> nl = "0d0a"x or tab = "09"x in my scripts
 >> I also understand that converting hex numbers in the format 0xhhhhhhhh
 >> automatically to string in decimal format (i.e. interpreting 0x10 as "16")
 >> would be inconsistent with REXX as it should translate everything to
 >> text strings, but that would make programming much easier.
 >
 >Well, which representation should Rexx reliably pick then?

it should allow numeric representation in the format 0xabcdef12 and
quietly convert them to the corresponding decimal string, i.e. :

RXSTRING.strlength = 10
RXSTRING.strptr = "2882400018"

this would introduce a bit of incosistency but would make dealing with
hex numbers much easier

 >> And if such consistency is so important then I do not understand why
 >> such automatic translation to a text string is not applied to stem
 >> variables in function calls, but enclosing the name of the stem is
 >> instead required
 >
 >Ad passing stems by reference: this has only become possible with Object REXX (and roo! for that
 >matter AFAICT). There you would need to use

OK the reason, as somebody else (sorry I do not remember who) pointed out
in a past article, is that for REXX a. is not a stem but just a variable,
that is :

a. = 3
a.0 = 2
a.1 = "a string"
a.2 = "another string"

is valid REXX code
so I cannot just use a. in a procedure call as the REXX interpret
does not know if it is a stem variable name or a simple variable name

IMO this is a fruit of poor language design:
as numbers are not allowed as first character of a symbol name, so
dots should not be allowed as last character of a symbol name

the ability of using a. as a valid symbol name adds nothing to the
easy of use of the language, but is a source of confusion and
difficult to spot errors

the need to enclose stem variables between quotes also introduces
inconsistency as all other kind of variable names do not need quotes

 >> Another problem due to the lack of representation of numbers in
 >> hexadecimal format is that you cannot be sure what an external
 >> REXX extension library may use:
[...]
 >> - it might just convert the raw value doing endian reversing itself
 >>   call foo "abcdef12"x
 >
 >Hmm, how would you be able to come up with a (simple) rule that would clearly determine how an
 >arbitrary string should be intepreted/manipulated?

the essence is that since REXX does not provide a method to directly
specify hex numbers it is hard to guess what a 3rd party library uses
for that purpose

if REXX, as I wrote, allowed hex numbers like 0xabcdef12 and then convert
them to the corresponding decimal string, there would be no problems as
external library coders would just convert the string content to unsigned
long

now you cannot be sure what approach a library uses without reading the
documentation

 >In Rexx strings are *never* changed by the interpreter. You - as the programmer - must explicitly
 >demand changing the content of strings! This way no unexpected side-effects can occur.

I was not dealing about the REXX interpreter but about the format used
by an external library written in C, pascal, etc to extend REXX

that is, suppose you have RxSetWinStyle(hwnd, style) in a REXX DLL,
you have no way to tell what the API takes as style parameter!
it might be 1 of the 4 different formats I described in my previous post

 >> and last but not the least there are problems coming from the default
 >> numeric digit settings too:
 >>
 >> say c2d("10"x)         >> 16
 >> say c2d("ffffffff"x)   >> Incorrect call to method
 >
 >Yes and no. Try instead:
 >
 >    say c2d("ffffffff"x, 4)  /* you'll get -1 */

and what should I do if I rather want an unsigned 4 bytes value (4294967295) ?

 >Of course it is necessary to look up the definitions of the functions one uses. In the case of Rexx
 >all arithmetic decimal number conversions are carried out with 9 digits. If that is not sufficient
 >for your particular conversion then you can increase the number of digits Rexx should use, e.g.:

that is even a further step needed to correctly handle hex numbers

 >> as much as you like REXX you should admit that it does not make
 >> dealing with hex numbers so comfortable as other scripting languages do
 >
 >Again, it is a question of the paradigm of the language. At times (when tackling bit-operation
 >problems) I wished for the bit shift operators ">>", "<<" from other languages, OTOH it really
 >didn't hinder me to achieve what I wanted.

I think it is silly to care about paradigms more than real programming:
if REXX had not allowed dots at the end of symbols and had allowed
numbers to be represented as 0xff (and 0b0101010) it would be much
easier to use

 >In Object REXX you *could* create your own number representations with all the operations going with
 >it. As a matter of fact there are examples on how one can define complex numbers and use them in
 >addition, subtraction, multiplication and division operations!

complex numbers are not a different representation of numbers but a
completely different kind of data
creating a class for dealing with hex numbers would not be as effective

 >The passing stems by reference is solved with Object Rexx.
 >
 >Object Rexx would allow you to add additional datatypes (each class you define is actually the

I know the basics of object rexx

--
bye
Alessandro
0
tin
3/30/2006 5:33:05 AM
 > Another problem due to the lack of representation of numbers in
 > hexadecimal format is that you cannot be sure what an external
 > REXX extension library may use:

That could be another area for possible improvement, perhaps
possible without having to beg for changes to REXX itself: a
kind of semi-standardized "library of libraries", and so on,
perhaps even dropping the need for individuel RxFuncAdd()'s.
There are many stand-alone external libraries out there, and
often there's no need for those libraries to be stand-alone.
Just my $0.02...



---
  
0
ML
3/30/2006 2:16:25 PM
In <UEhKEJzxPHje092yn@tin.it>, on 03/29/2006
   at 05:46 AM, @tin.it (Alessandro) said:

>slowly... too much slowly... you are right I should stop complaining and
>use the little time I have to code :-)

That's what I try to do.  Life is short.  Too many interesting projects. 
Too little time. ;-)

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/30/2006 6:49:40 PM
On Thu, 30 Mar 2006 05:33:05 UTC,         @tin.it (Alessandro) wrote:

> It should allow numeric representation in the format 0xabcdef12

Why force it to accept a numeric representation from another language or
two, when it already has one of its own?

0
Bob
3/31/2006 7:17:13 AM
In article <176uZD2KcidF-pn2-K0eK8yNfhVf2@rikki.tavi.co.uk>,
"Bob Eager" <rde42@spamcop.net> wrote:

 >> It should allow numeric representation in the format 0xabcdef12
 >
 >Why force it to accept a numeric representation from another language or
 >two, when it already has one of its own?

because current representation is not for numbers but for text strings
i.e. it is the equivalent of C "\xhh" escape sequence more than a
numeric representation

in my post I described the problems caused by this

--
bye
Alessandro
0
tin
4/1/2006 5:38:36 AM
Hi Alessandro,

Alessandro wrote:
> In article <176uZD2KcidF-pn2-K0eK8yNfhVf2@rikki.tavi.co.uk>,
> "Bob Eager" <rde42@spamcop.net> wrote:
> 
>  >> It should allow numeric representation in the format 0xabcdef12
>  >
>  >Why force it to accept a numeric representation from another language or
>  >two, when it already has one of its own?
> 
> because current representation is not for numbers but for text strings
> i.e. it is the equivalent of C "\xhh" escape sequence more than a
> numeric representation
> 
> in my post I described the problems caused by this

There are no problems with this, it is a different paradigm. If you need hexadecimal or binary 
strings you can write them down in Rexx by appending the "x" or "b" character, you know that, which 
yields the exact same sequence of *characters* as in C or other languages.

It seems that you want to have C semantics available. But then you realize of course that a C "int" 
is usually represented as binary string of 32 bits, or as a hexadecimal of 4 Bytes and as such is 
physically represented as four consecutive characters of size byte.

In Rexx you would need to use a decimal number representation to be able to carry out arithmetics. 
That is the way the language got defined and most people have no problems with that at all.

Again, in ooRexx you could add those features that you desire to have available for your purposes 
(which also means that there is no need whatsoever to change the design of the Rexx language).

Regards,

---rony

P.S.: What should be the result of (could it even be calculated with your proposal?):

	(0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0

Would you regard that to be easyly comprehendable ?
0
rony
4/2/2006 11:10:03 AM
[A complimentary Cc of this posting was sent to
rony 
<Rony.Flatscher@wu-wien.ac.at>], who wrote in article <e0obef$9k6$1@trane.wu-wien.ac.at>:
> P.S.: What should be the result of (could it even be calculated with your proposal?):

> 	(0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0

Easy to check:

  perl -MMath::Pari=:hex -wle "print for (0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"
  3323176536252090695442335647/23077579909509855749396284644145832412141012663470715120

> Would you regard that to be easyly comprehendable ?

Do you know a better way to write this down - if one NEEDS to do a
calculation using these constants?

Puzzled,
Ilya
0
Ilya
4/3/2006 1:53:56 AM
OK... I've realized that, after all, I can make my REXX extension APIs
accept as parameter both the usual REXX decimal numbers and C hexadecimal
numbers entered as "0xhhhhhhhh"... of course I cannot perform any
operations on those strings but it is anyway a satisfactory solution...

BTW is anybody interested in a DLL which extends DrDialog features ?

Currently I added the ability to set any icon as system menu icon
and the option to register an exit control (i.e. a button or menuitem
id used to dismiss the dialog)
once an exit control is registered, the DLL allows to trap dialog
dismission via the close button, the Esc key, the windows list and the
system shutdown, so now it is possible to prompt the user to ask if he
wants to save data before exiting

since I need some missing MLE features I'm going to add an interface to
some MLM_* messages (so far I succesfully tested only MLM_CLEAR).
If anybody is interested it should be really easy
and would not take much time to add APIs to interface with the most
common messages of the standard PM controls...

just let me know

--
bye
Alessandro
0
tin
4/3/2006 2:22:12 AM
Ilya Zakharevich wrote:
> [A complimentary Cc of this posting was sent to
> rony 
> <Rony.Flatscher@wu-wien.ac.at>], who wrote in article <e0obef$9k6$1@trane.wu-wien.ac.at>:
>> P.S.: What should be the result of (could it even be calculated with your proposal?):
> 
>> 	(0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
> 
> Easy to check:
> 
>   perl -MMath::Pari=:hex -wle "print for (0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"
>   3323176536252090695442335647/23077579909509855749396284644145832412141012663470715120

[Are you using an extension module that you wrote yourself to do that in Perl?]

> 
>> Would you regard that to be easyly comprehendable ?
> 
> Do you know a better way to write this down - if one NEEDS to do a
> calculation using these constants?

How about:

numeric digits 60 /* use 60 significant digits in arithmetic operations and conversions */
say 
(c2d("abcde010203abcd0f0f0f0f"x)+c2d("1234567890"x))/c2d("f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"x)

It'll yield the decimal number: 
0.000000000000000000000000000144000217929379561808051955656647072385891251170299630583427

The result BTW poses another problem if only using hex strings: how would you encode that result as 
a hex string (which usually is used to store 2-based integers, whereas you now got a decimal number, 
which in other languages usually is represented with the datatypes float, double, etc)?

---

In Rexx it is obviously a number (string of digits, comprehensible by humans) and therefore it is 
not a problem to use it in additional arithmetics or treat it like a plain string.

Regards,

---rony
0
rony
4/3/2006 7:01:28 AM
[A complimentary Cc of this posting was sent to
rony 
<Rony.Flatscher@wu-wien.ac.at>], who wrote in article <e0qh8c$mlp$1@trane.wu-wien.ac.at>:
> >> P.S.: What should be the result of (could it even be calculated with your proposal?):
> > 
> >> 	(0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
> > 
> > Easy to check:

> >   perl -MMath::Pari=:hex -wle "print for (0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"
> >   3323176536252090695442335647/23077579909509855749396284644145832412141012663470715120

> [Are you using an extension module that you wrote yourself to do that in Perl?]

Math::Pari is Perl glue to the GP/PARI math library; yes, the glue
code is written by myself.  Most probably any other BIGNUM extension
allows the same functionality; I used Math::Pari since I remember the
syntax (:hex) for hijacking Perl lexer - and I'm sure about its coding
quality ;-).

> > Do you know a better way to write this down - if one NEEDS to do a
> > calculation using these constants?
> 
> How about:
> 
> numeric digits 60 /* use 60 significant digits in arithmetic operations and conversions */
> say 
> (c2d("abcde010203abcd0f0f0f0f"x)+c2d("1234567890"x))/c2d("f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"x)

You seriously call this *better* syntax?  Or did I misunderstand what
you wanted to say?

> The result BTW poses another problem if only using hex strings: how
> would you encode that result as a hex string (which usually is used
> to store 2-based integers, whereas you now got a decimal number,
> which in other languages usually is represented with the datatypes
> float, double, etc)?

One one hand, in Math::Pari hex output is trivial too: there is a
function to access bits of a BIGINT; so one can easily construct the
hex/octal/binary representation of an integer.

On the other hand, the result is not a BIGNUM ;-); it is either
BIGFRACTION (as in my Math::Pari example), or a BIGFLOAT (as in your
example).  Again, in Math::Pari it is not a big deal to output a
BIGFLOAT in a hex format (however useful this might be ;-).  But for
BIGNUM usability of hex output for fractions is vanishingly small...

Hope this helps,
Ilya
0
Ilya
4/3/2006 7:37:12 AM
Hi Ilya,

Ilya Zakharevich wrote:
> [A complimentary Cc of this posting was sent to
> rony 
> <Rony.Flatscher@wu-wien.ac.at>], who wrote in article <e0qh8c$mlp$1@trane.wu-wien.ac.at>:
>>>> P.S.: What should be the result of (could it even be calculated with your proposal?):
>>>> 	(0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
>>> Easy to check:
> 
>>>   perl -MMath::Pari=:hex -wle "print for (0xabcde010203abcd0f0f0f0f + 0x1234567890) / 0xf0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"
>>>   3323176536252090695442335647/23077579909509855749396284644145832412141012663470715120
> 
>> [Are you using an extension module that you wrote yourself to do that in Perl?]
> 
> Math::Pari is Perl glue to the GP/PARI math library; yes, the glue
> code is written by myself.  Most probably any other BIGNUM extension
> allows the same functionality; I used Math::Pari since I remember the
> syntax (:hex) for hijacking Perl lexer - and I'm sure about its coding
> quality ;-).

I see.

>>> Do you know a better way to write this down - if one NEEDS to do a
>>> calculation using these constants?
>> How about:
>>
>> numeric digits 60 /* use 60 significant digits in arithmetic operations and conversions */
>> say 
>> (c2d("abcde010203abcd0f0f0f0f"x)+c2d("1234567890"x))/c2d("f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0"x)
> 
> You seriously call this *better* syntax?  Or did I misunderstand what
> you wanted to say?

Actually yes, but for another reason: the Rexx solution only uses the means "on board of the 
language". Embedding the hex literals into a built-in Rexx function that turns those values to 
decimal numbers looks simple (natural?) for Rexx coders (but for them - and for casual programmers - 
syntaxes derived from C one way or the other and Unix shells may look difficult).

No, because I think it not too understandable if one uses hex-string literals in arithmetic 
operations (it looks very unnatural to me; I never had the need to that in C or any other language, 
as doing arithmetics would be carried out using variables with data of the appropriate type).

The above "challenge" came in a thread about the usefulness of hex literals, so I tried to come up 
with an example that would look rather "unnatural" (maybe even a little bit weird), because no one 
(at least I know of) would do that. (Of course, I was a little surprised to see a Perl extension 
module which would allow for such arithmetics...)


>> The result BTW poses another problem if only using hex strings: how
>> would you encode that result as a hex string (which usually is used
>> to store 2-based integers, whereas you now got a decimal number,
>> which in other languages usually is represented with the datatypes
>> float, double, etc)?
> 
> One one hand, in Math::Pari hex output is trivial too: there is a
> function to access bits of a BIGINT; so one can easily construct the
> hex/octal/binary representation of an integer.
> 
> On the other hand, the result is not a BIGNUM ;-); it is either
> BIGFRACTION (as in my Math::Pari example), or a BIGFLOAT (as in your
> example).  Again, in Math::Pari it is not a big deal to output a
> BIGFLOAT in a hex format (however useful this might be ;-).  But for
> BIGNUM usability of hex output for fractions is vanishingly small...

Hmm, I see. But now, if you look at Rexx, you notice that in Rexx there is no need for all of these 
different datatypes (BIGINT, BIGNUM, BIGFRACTION, BIGFLOAT, etc.) as its notion of a decimal number 
(a string consisting of digits and an optional decimal point) covers all of them.

So it seems to me that the Rexx solution in this case, due to the simplicity it allows for, is 
preferable (to me at least) because one needs not to memorize so much more information to tackle 
special issues like the one at hand (and even employ extension modules).

Your mileage may vary (and probably does), but that would be more than o.k. with me (chacun � son go�t).
:)

Regards,

---rony




0
rony
4/3/2006 8:33:18 AM
 > Do you know a better way to write this down - if one NEEDS
 > to do a> calculation using these constants?

FWIW, but one could use the "0x12345678"-constant, and write a
REXX "preprocessor" to convert this 0x-stuff to "'12345678'x",
possibly including a few Reverse()'s.

I'm not using everybody will like the looks of the result, but
it's possible to use hard-coded 0x's when writing it. Not sure
if this is a real problem, since 0xffff constantly has a value
of 65535, and so on. And how clear is "a=z-25";? 



--- 

0
ML
4/3/2006 2:15:45 PM
 > (Of course, I was a little surprised to see a Perl extension
 > module which would allow for such arithmetics...)

A while ago I started with a REXX2EXE-project, with a few bells
and whistles. For my own use, maily due to a lack of knowledge
(e.g. not implementing an equivalent of INTERPRET). That could
be able to optimize code (e.g. a variable isn't a RXSTRING but
actually exclusivly used as an ULONG, so declare it as an ULONG
instead of converting it a zillion times to and from a RXSTRING),
which also could allow support for multiple type declarations in
a control file. Pseudo-code:

    hex a;         /* a='ABCDEF12'x, REXX's default format */
    hex b type 0x; /* a=0xABCDEF12                         */

When using C for the job, this would actually convert the
variable a to 0xABCDEF12, while the variable b would be
used as-is. Something like this wasn't a goal of the tiny
project, which had more to do with "compiling" and allowing
and forbidding certain instructions, but it could be made
possible. FWIW (and the lack of knowledge still exists)! :-[

BTW, what about Java/NetREXX? I don't know those languages,
but what hex format are supported/usable in those areas,
combining 0x-notation and the easy of REXX?



---
0
ML
4/3/2006 6:20:59 PM
[A complimentary Cc of this posting was sent to
rony 
<Rony.Flatscher@wu-wien.ac.at>], who wrote in article <e0qmki$n58$1@trane.wu-wien.ac.at>:

> No, because I think it not too understandable if one uses hex-string
> literals in arithmetic operations (it looks very unnatural to me; I
> never had the need to that in C or any other language, as doing
> arithmetics would be carried out using variables with data of the
> appropriate type).

> The above "challenge" came in a thread about the usefulness of hex
> literals, so I tried to come up with an example that would look
> rather "unnatural" (maybe even a little bit weird), because no one
> (at least I know of) would do that. (Of course, I was a little
> surprised to see a Perl extension module which would allow for such
> arithmetics...)

For myself, I translated this as: "I never needed hex literals, so I
thought that example using them will look unnatural to other people too".

Well, since I see a need for hex literals quite often, naturally, it
did not look unnatural to me.  ;-)

> Hmm, I see. But now, if you look at Rexx, you notice that in Rexx
> there is no need for all of these different datatypes (BIGINT,
> BIGNUM, BIGFRACTION, BIGFLOAT, etc.) as its notion of a decimal
> number (a string consisting of digits and an optional decimal point)
> covers all of them.

LOL!  What you describe IS a BIGFLOAT (well, usually they are
implemented in binary, but this is not that important at all).  Now
try to describe 1/3 as a BIGFLOAT...

Hope this helps,
Ilya
0
Ilya
4/3/2006 10:35:22 PM
On Thu, 23 Mar 2006 05:39:42 GMT, Steven Levine <steve53@earthlink.bogus.net>
wrote:

> You may think so.  However, there more to stems that just this.  They have
> some special properties.  In an expression, the label A. is not a stem, it
> is a variable name which may or may not happen to be the member of a stem. 
> This is easy to see with
> 
>   say a.
>   a. ='really'
>   a.1 = 'one'
>   say a.
>   say a.1
>   say a.2

I really don't understand why "say a.2" prints "really". How and why is
this so?

>>besides that, being an high level language REXX should make programming
>>easier and more productive, but with its odd logic it often causes more
>>troubles than it solves
> 
> I and many others don't find this to be case.  IMO, the key to working
> with any language is to understand how it was intended to be used and work
> within the paradigm.

But almost nobody understands how it was intended to be used, due to the
lack of any precise documentation. It is things like your above example
that throw people into fits of confusion.
This makes the language unpredicatable, and therefore a major source of
bugs as nobody knows what the hell it is supposed to do in any given
situation.
Any positive benefits of what the language could do are far outwighed by
the negatives because it is so unintuitive.
0
Paul
4/13/2006 9:59:48 AM
 >>   say a.
 >>   a. ='really'
 >>   a.1 = 'one'
 >>   say a.
 >>   say a.1
 >>   say a.2
 
 > I really don't understand why "say a.2" prints "really".
 > How and why is this so?

The default value of a.2 is "A.2". You can assign another
default value to the whole stem or compound variable with
typing nothing after the dot.

E.g. you cannot use "x=(a.3)+1", because "A.3" is not a
number. This would work if you used "a.=0;x=(a.3)+1".

/* Not tested */
SAY a.3
a.=0 /* like C's calloc() */
SAY (a.3)+1

The output should read "A.3" and "1".



---
0
ML
4/13/2006 11:12:48 AM
in 47911 20060413 105948 Paul Ratcliffe <abuse@orac12.clara34.co56.uk78> wrote:

>But almost nobody understands how it was intended to be used, due to the
>lack of any precise documentation. It is things like your above example
>that throw people into fits of confusion.
>This makes the language unpredicatable, and therefore a major source of
>bugs as nobody knows what the hell it is supposed to do in any given
>situation.
>Any positive benefits of what the language could do are far outwighed by
>the negatives because it is so unintuitive.

Sorry, Paul, but I can't agree with any of that.  Anyone who has been a VM/370 user
(they must run into the millions) will be familiar with Rexx and how it is used, and
many of them - even non-programmers - have felt confident enough to apply their
own minor changes to system execs.

Documentation was more than adequate - a user guide and a language reference 
- and as for "a major source of bugs" that just wasn't the case.  All the programmers
I worked with found Rexx easy to learn, debugging was straight-forward and the 
finished code was robust and reliable.  

I can probably find copies of the manuals if you'd like me to?
0
Bob
4/13/2006 3:19:55 PM
On Thu, 13 Apr 2006 09:59:48 UTC, Paul Ratcliffe 
<abuse@orac12.clara34.co56.uk78> wrote:

> >   say a.
> >   a. ='really'
> >   a.1 = 'one'
> >   say a.
> >   say a.1
> >   say a.2
> 
> I really don't understand why "say a.2" prints "really". How and why is
> this so?

Because assignment to the stem name is defined as assignment to all 
possible members/subscripts/whatever of that stem. I've used that to 
good effect when stripping out duplicates:

 a. = ''
 
(assign non-null string to members subscripted by, say, a person's name)

if 'a. subscripted by name is non null' then we already have it...

0
Bob
4/13/2006 3:28:44 PM
in 47915 20060413 162844 "Bob Eager" <rde42@spamcop.net> wrote:
>On Thu, 13 Apr 2006 09:59:48 UTC, Paul Ratcliffe
><abuse@orac12.clara34.co56.uk78> wrote:
>
>> >   say a.
>> >   a. ='really'
>> >   a.1 = 'one'
>> >   say a.
>> >   say a.1
>> >   say a.2
>>
>> I really don't understand why "say a.2" prints "really". How and why is
>> this so?
>
>Because assignment to the stem name is defined as assignment to all
>possible members/subscripts/whatever of that stem. I've used that to
>good effect when stripping out duplicates:
>
>a. = ''
>
>(assign non-null string to members subscripted by, say, a person's name)
>
>if 'a. subscripted by name is non null' then we already have it...

Right.  It's a form of contents-addressable memory.
0
Bob
4/13/2006 6:33:24 PM
On Thu, 13 Apr 2006 18:33:24 UTC, Bob Martin <bob.martin@excite.com> 
wrote:

> in 47915 20060413 162844 "Bob Eager" <rde42@spamcop.net> wrote:
> >On Thu, 13 Apr 2006 09:59:48 UTC, Paul Ratcliffe
> ><abuse@orac12.clara34.co56.uk78> wrote:
> >
> >> >   say a.
> >> >   a. ='really'
> >> >   a.1 = 'one'
> >> >   say a.
> >> >   say a.1
> >> >   say a.2
> >>
> >> I really don't understand why "say a.2" prints "really". How and why is
> >> this so?
> >
> >Because assignment to the stem name is defined as assignment to all
> >possible members/subscripts/whatever of that stem. I've used that to
> >good effect when stripping out duplicates:
> >
> >a. = ''
> >
> >(assign non-null string to members subscripted by, say, a person's name)
> >
> >if 'a. subscripted by name is non null' then we already have it...
> 
> Right.  It's a form of contents-addressable memory.

Exactly. It's a feature of REXX I use a great deal. A recent example was
a set of lists of people and their email addresses. Various groups of 
sets are emailed at different times, and some sets overlap but only one 
email must go. The email is built, generated and sent using REXX (and a 
small SMTP utlity I already have).

Lots of other uses though.
0
Bob
4/13/2006 6:55:17 PM
On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
person by the name of Bob Martin exclaimed:
> Right.  It's a form of contents-addressable memory.

I think Paul was objecting to the default behaviour of treating an 
undefined variable as a literal, and I do believe that this is foolish 
behaviour in language design. Errors should be clear and obvious

-- 
aaronl at consultant dot com 
For every expert, there is an equal and 
opposite expert. - Arthur C. Clarke
0
Aaron
4/16/2006 8:45:17 AM
On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
person by the name of Bob Martin exclaimed:
> Documentation was more than adequate - a user guide and a language reference 
> - and as for "a major source of bugs" that just wasn't the case.  All the programmers
> I worked with found Rexx easy to learn, debugging was straight-forward and the 
> finished code was robust and reliable.  

I will counter your anecdotes with some of my own :)
People I worked with built many applications both small and large with 
Rexx, and the process of debugging them was long, confusing, drawn-out 
and never reached a certain result. In the majority of cases the 
decision was that we should not have used Rexx. This was not just my 
opinion but the opinion of many after we had been maintaining stuff for 
a while. Rexx and it's GUI relatives VX and VisPro were pushed hard by 
one person, who unfortunately had a lot of sway at the time, thus 
costing us a lot of money in wasted time and contributed to the 
perception of a unreliable product to customers.

-- 
aaronl at consultant dot com 
For every expert, there is an equal and 
opposite expert. - Arthur C. Clarke
0
Aaron
4/16/2006 8:50:06 AM
in 47923 20060416 095006 Aaron Lawrence <aaronlNOT@HEREconsultant.com> wrote:
>On a pleasant day while strolling in comp.os.os2.programmer.misc, a
>person by the name of Bob Martin exclaimed:
>> Documentation was more than adequate - a user guide and a language reference
>> - and as for "a major source of bugs" that just wasn't the case.  All the programmers
>> I worked with found Rexx easy to learn, debugging was straight-forward and the
>> finished code was robust and reliable.
>
>I will counter your anecdotes with some of my own :)
>People I worked with built many applications both small and large with
>Rexx, and the process of debugging them was long, confusing, drawn-out
>and never reached a certain result. In the majority of cases the
>decision was that we should not have used Rexx. This was not just my
>opinion but the opinion of many after we had been maintaining stuff for
>a while. Rexx and it's GUI relatives VX and VisPro were pushed hard by
>one person, who unfortunately had a lot of sway at the time, thus
>costing us a lot of money in wasted time and contributed to the
>perception of a unreliable product to customers.

You are obviously talking about PCs.
I was describing my mainframe experiences.
I know there shouldn't be much difference but I have never found Rexx on OS/2
to be as robust as the (Mike Cowlishaw written) VM/370 original.
0
Bob
4/16/2006 9:51:13 AM
In article <MPG.1eacbd389011d30a989ee7@news.xtra.co.nz>,
Aaron Lawrence <aaronlNOT@HEREconsultant.com> wrote:

 >On a pleasant day while strolling in comp.os.os2.programmer.misc, a
 >person by the name of Bob Martin exclaimed:
 >> Right.  It's a form of contents-addressable memory.
 >
 >I think Paul was objecting to the default behaviour of treating an
 >undefined variable as a literal, and I do believe that this is foolish
 >behaviour in language design. Errors should be clear and obvious

another problem with the faulty design of hexadecimal number/string
representation is the inconsistency showed by the following example:

a = "something"
c = " else"
say a""c
>> something else
x = c
say a""x
>> something

that is you cannot use 'b' and 'x' as variable names otherwise you
may get unexpected results with the abuttal operator

of course there are workarounds but the problem IMO is that REXX
make it easy to introduce difficult to spot errors

BTW I'm downloading the newsgroup articles through the server of my
internet provider, but unfortunately, lately, most of messages of
comp.os.os2.programmer.misc are not delivered to me...
can anybody suggest me a more reliable and free newsgroup server ?

thanks

--
bye
Alessandro
0
tin
4/17/2006 5:32:42 AM
On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
person by the name of Bob Martin exclaimed:
> You are obviously talking about PCs.

That's true, but the problems were not due to the implementation but the 
nature of Rexx, which was not designed with the "principle of least 
surprise" in mind. ..

-- 
aaronl at consultant dot com 
For every expert, there is an equal and 
opposite expert. - Arthur C. Clarke
0
Aaron
4/17/2006 1:07:44 PM
On Mon, 17 Apr 2006 05:32:42 UTC,         @tin.it (Alessandro) wrote:

> BTW I'm downloading the newsgroup articles through the server of my
> internet provider, but unfortunately, lately, most of messages of
> comp.os.os2.programmer.misc are not delivered to me...
> can anybody suggest me a more reliable and free newsgroup server ?

Bite the bullet and pay 10 euro a year to news.individual.net. You get 
what you pay for!


0
Bob
4/18/2006 8:30:57 AM
Aaron Lawrence wrote:
> On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
> person by the name of Bob Martin exclaimed:
>> Right.  It's a form of contents-addressable memory.
> 
> I think Paul was objecting to the default behaviour of treating an 
> undefined variable as a literal, and I do believe that this is foolish 
> behaviour in language design. 

You are free to judge concepts the way you see them, of course, *but*: *if* you ever had read a book 
about Rexx (like "The Rexx Language", aka "TRL", by the father of Rexx, Mike F. Cawlishaw) then this 
would be no surprise whatsoever. It has to do with the "human centricness" that MFC tried to 
incorporate into the language.

The basic rule is simple: everything in Rexx is a string. If you use a Rexx symbol like a name that 
could be used as a variable name, then Rexx will use that symbol, unless it is used as a variable 
and has a value assigned to it (in which case that value will be used). Or put in other words: if a 
Rexx variable is uninitialized, then its name is used as its string value.

There is another basic rule one should know about Rexx: before the interpreter executes a Rexx 
statement, all symbols outside of quotes are uppercased, multiple blanks between symbols are reduced 
to one blank. (That is the reason why in Rexx the value of an uninitialized variable is its 
uppercase string version, because the interpreter will get everything uppercased.)

Maybe, a third basic rule: a string that is not a Rexx statement does not automatically raise an 
execution error. Instead that unknwon string is forwarded by Rexx to the program that invoked Rexx; 
should that program not be able to execute a command as given in that string, a runtime error is 
raised. (Many times it will be the command interpreter cmd.exe.)


> Errors should be clear and obvious

Right.

Object Rexx improved that considerably and its error messages are very clear and helpful.

Also, if one does not like/intend to use uninitialized variables, one can tell Object Rexx to raise 
an exception (cf. "NOVALUE") and interrupt the program.

---rony



0
rony
4/18/2006 8:56:25 PM
Aaron Lawrence wrote:
> On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
> person by the name of Bob Martin exclaimed:
>> You are obviously talking about PCs.
> 
> That's true, but the problems were not due to the implementation but the 
> nature of Rexx, which was not designed with the "principle of least 
> surprise" in mind. ..

What is a surprise depends on the mindset one has developed towards programming languages and the 
degree of knowledge about them. E.g. if using and being used to strictly typed languages like C++ or 
Java, weakly typed ones (especially with interpreters) like Rexx may indeed surprise.

But as always: surprises come into play only, if one does not know a technology in full (which has 
become to be very hard anyway in todays world).

---rony

0
rony
4/18/2006 9:01:27 PM
Aaron Lawrence wrote:

> That's true, but the problems were not due to the implementation but the 
> nature of Rexx, which was not designed with the "principle of least 
> surprise" in mind. ..
> 
  I think C++ put the principle of least astonishment squarely on its 
head by ensuring that you can never tell for sure what a line of code 
might possibly do, courtesy of operator overloading. Reading C++ source 
code is fun.


        Michal
0
Michal
4/18/2006 9:29:14 PM
Sir:

Michal Necasek wrote:
> Aaron Lawrence wrote:
> 
>> That's true, but the problems were not due to the implementation but 
>> the nature of Rexx, which was not designed with the "principle of 
>> least surprise" in mind. ..
>>
>  I think C++ put the principle of least astonishment squarely on its 
> head by ensuring that you can never tell for sure what a line of code 
> might possibly do, courtesy of operator overloading. Reading C++ source 
> code is fun.
> 
> 

Is that not why they invented reverse engineering tools that translate 
source code into UML?  Of course, you introduce another variable into 
mix.  Not only do you have the compiler translating that code, but you 
have the reverse engineering tool translating that code.  Either of 
which can do not what they supposed to do.  Reading UML and Assembly 
falls into my definition of fun, not!
-- 
Bill
Thanks a Million!
0
William
4/18/2006 11:37:07 PM
In <KSc1g.69817$Jd.7923@newssvr25.news.prodigy.net>, on 04/18/2006
   at 09:29 PM, Michal Necasek <michaln@scitechsoft.com> said:

>  I think C++ put the principle of least astonishment squarely on its 
>head by ensuring that you can never tell for sure what a line of code 
>might possibly do, courtesy of operator overloading. Reading C++ source 
>code is fun.

All languages have features that can be misused.  Operator overloading has
its place.  When used with some common sense, the intent of the code is
reasonably obvious.  When I look at the Mozilla sources there is operator
overloading, but I don't find gratuitous overloading.

IMO, writing REXX without all the signal handlers turned on is similar to
writing C with all the warnings turned off.  The tools will allow it and
some folks can even manage to write largish programs that appear to work,
but why bother.

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
4/19/2006 12:15:30 AM
Steven Levine wrote:

> All languages have features that can be misused.  Operator overloading has
> its place.  When used with some common sense, the intent of the code is
> reasonably obvious.  When I look at the Mozilla sources there is operator
> overloading, but I don't find gratuitous overloading.
> 
  Operator overloading seems to invite abuse for some reason. I can see 
its utility eg. for matrix math, where the overloaded operators are 
intuitive and do what most people would expect them to do. It's when the 
overloaded operation is non-intuitive or has unexpected side effect when 
overloading is a disaster.

  In my experience, too many programmers do not have the discipline (or 
experience) not to abuse certain language features, so the length of 
rope provided by the language ought to be limited ;)


        Michal
0
Michal
4/19/2006 1:19:33 AM
On Sun, 16 Apr 2006 20:45:17 +1200, Aaron Lawrence
<aaronlNOT@HEREconsultant.com> wrote:
> I think Paul was objecting to the default behaviour of treating an 
> undefined variable as a literal, and I do believe that this is foolish 
> behaviour in language design. Errors should be clear and obvious

Indeed, but that's why God (or at least Mike Cowlishaw) gave us
'SIGNAL ON NOVALUE'.

Now if only it worked under VX-REXX...

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
4/19/2006 3:30:03 PM
Reply:

Similar Artilces:

New Rexx Book: Rexx Programmer's Reference
I'm surprised that nobody's shouted this news from the rooftops. A google search of this group revealed some references to it in other threads, but it deserves more prominent mention, I think. The first Rexx book published in about ten years! Rexx Programmer's Reference by Howard Fosdick Paperback, 720 pages Published by Wrox Press, February 28, 2005 ISBN 0764579967 List Price: $39.99 Amazon Price: $26.39 and free "super saver" shipping http://www.amazon.com/exec/obidos/tg/detail/-/0764579967/ Book Description from the amazon.com page: * Originally developed for mai...

os/2 vx and Object Rexx
Hi all I thought I would share is problem with one and all, starting with the problem. One creates a new VXRExx project, and under section you add a file with Object Rexx classes and method, all with correct formating and returns, then say add some code to a button, which initiates these, you run it, and all is well. Then you make the exe file and run that, wow panic, "cannot load window" error comes up what the heck is going on, "someone go call Hanna...." although I have lost the book "Object REXX for OS/2 Rexx Bytes Objects Now or Taking the "Oh, oh!"...

Why the object's *PUBLIC authority is changed to *EXCLUDE after restore the object(s)?
I found the thread http://search400.techtarget.com/ateQuestionNResponse/0,289625,sid3_gci1025406_tax299170,00.html?bucket=ETA, it stated "if you only do the SAVLIB, DLTLIB and RSTLIB and the user profile that owns the library doesn't exist on the system when the RSTLIB is performed, the library(s) will be owned by QDFTOWN and the *PUBLIC authority will be set to *EXCLUDE...". I know why the object owner is changed to QDFTOWN, but why the *PUBLIC is changed to *EXCLUDE? I do save/restore between 2 machines, but the *PUBLIC authority is the same as source machine. Does I lose som...

RexxStart hits segmentation fault with Open Object Rexx but not with IBM Object Rexx
I'm trying to convert the build process for our product's interface to Rexx from using the IBM version of Object Rexx to using Open Object Rexx. Our code works fine on Windows, but I'm having trouble on Linux. I downloaded the ooRexx-4.0.1.i586.suse10.rpm from http://www.oorexx.org and adjusted our build to use the oorexx directories. The build works find, but when the code calls RexxStart, it hits a segmentation fault and the process dies. I've triple checked all the arguments and I can't find anything wrong. Is there some trick to using the Open Object Rexx vers...

Are Delphi's objects always pointers to objects? (comparing Delphi objects and C++ objects)
I'm trying to convert some C++ code to Delphi but I'm a bit confused on how objects (and object pointers) are different between the two languages. In Delphi it seems like objects are all pointers to objects. The reason I'm asking is because of the C++ "->" operator (or whatever you would classify that symbol as). I'm confused on how this translates to Delphi. For example, consider the following code: var MyObj1, MyObj2: TMyObject; begin MyObj1 := TMyObject.Create; // instantiate object (allocate memory) and have MyObj1 point to the memory ...

[News] ODF a Programmer's Friend, OOXML a Programmer's Foe
Web and Application development ,----[ Quote ] | How well is ODF and OOXML supported in different languages? | | I started off by choosing six common languages used by application and Web | developers, then I went and looked for what libraries are available for each | document format: | Language ODF OOXML | Python Yes No | Perl Yes No | Ruby Yes No | PHP Yes Started | Java Yes Started | Microsoft C# Yes Yes `---- http://commandline.org.uk/more/formats/library-shootout-odf-vs-ooxml-2007-11-28-00-03.html...

memory not released in OS/2 Object Rexx
I am using OS/2 Warp 4 Fixpak 10 which includes both Classic Rexx and Object Rexx. I just discovered that if I Ctrl-C out of a running Rexx program the program's memory is released under Classic Rexx but is *not* released under Object Rexx. Subsequently closing the window in which the program was running under Object Rexx does not release the memory. Does anyone know if this was fixed and, if so, what Fixpak I need to move up to? Here's the code that uses up the memory: /* Read 55 MB file. */ NewString = charin( SourceFile, , SourceFileSize ) call DisplayControlCharact...

Object REXX's NOVALUE condition?
Here's a strange thing about Object REXX as concerns the NOVALUE condition. Consider the following simple scripts: SIGNAL ON NOVALUE SAY MyVar SAY "NOVALUE not triggered" RETURN NOVALUE: RETURN The above does not report "NOVALUE not triggered" SIGNAL ON NOVALUE SAY MyVar.1 SAY "NOVALUE not triggered" RETURN NOVALUE: RETURN The above does not report "NOVALUE not triggered" SIGNAL ON NOVALUE SAY MyVar. SAY "NOVALUE not triggered" RETURN NOVALUE: RETURN The above *does* report "NOVALUE not triggered". So it seems that Object ...

Programmers, Programmers, Programmers, ...
As Steve Balmer correctly stated, while making his monkey dance, it is applications and hence programmers that make a platform. The fact though is that if you want to do professional programming, then Linux is the platform for you. I know that this statement will get the heckels up on a lot of trolls in C.O.L.A, but I have a recent experience that proves this. I am currently working for a Windows only house producing a system that receives and transmits around 1000 telegrams per second in each direction on a UDP socket, translates them into a different format and creates a log entry for each ...

What's the different between Relational DBMS and Object Relational DBMS? What's the problem between Relational DBMS and Object Relational DBMS?
I am doing a final project with the title comparison of RDBMS and ORDBMS. I use to some research about the 2 different database and I want to know more about the difference between this 2 in practical. Can someone give me some idea? Thanks. ...

Misc Expansion, OS's, development and project proposals.
I would like to put some ideas out to increase minimal instruction set computer processors usefulness, and open them for discussion.=A0 I am doing my own commercial projects, but can see a few things that can help the development community in this segment.=A0 If anybody would like these projects please come, or know people that might be interested please let them know. The ideas open up new areas of product development, and are largely sequential, meant to be developed one after the other, one step at a time. The ideas below also would work best with a 32 bit version of misc, but...

What's the proper way to share an object with several objects? (eg. a logging object)
This seems to be a stupid question but I'm a bit confused... Right now I have my main form that creates an object of the class "TLog". Main also creates other objects (eg. TConnections, TPlayer) that I would like to use the log object I just created. Do I need to pass my already-created TLog object into every other object I create? It seems like there is a better way of doing it. Example: 1. My main form creates a TLog and a TConnections object. 2. My TConnections object creates a TPlayer object. 3. My TPlayer object creates a TDatabase object. Do I need pas...

Porter/Programmer Required for Sponsored Porting of UNIX s/w to OS/2
Dear All, Apologies for the cross-posting. I would very much like to sponsor someone with previous experience of porting UNIX software to OS/2, either using EMX or the Innotek GCC (I guess Innotek GCC preferred as likely to be more stable, but EMX would nevertheless be very much appreciated). The software I would like ported is all well-known GPL software and the porter will be free to distribute and use the software as per GPL. Some of the software already has been previously ported to OS/2 \eCS - I would like to see newer versions available. If you are interested (or know a...

For Sale: RISC OS 3.6 Programmer's Reference Manuals
Hi, My RISC OS 3.6 Programmer's Reference Manuals are for sale on e-bay: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3D230176913450 They are in excellent condition. Volumes 1-4, index and style guide in original box. RISC OS 3.6 supplement (volume 5a) and index in separate cardboard box. These books are an excellent guide for anyone wishing to learn to program for the RISC OS range of computers, or a handy reference for experienced programmers. Postage rate is =A312 within UK, alternatively collect for free from Woking, Surrey. I am emigrating to New Zealand and it'...

Web resources about - Object REXX is a s***... - comp.os.os2.programmer.misc

Object database - Wikipedia, the free encyclopedia
When database capabilities are combined with object-oriented programming language capabilities, the result is an object-oriented database management ...

Man threw objects from ute at other cars on highway near Yass, police allege
... latest incident, a 25-year-old woman was driving a Honda Civic in a 100km/h zone on the Olympic Highway at Yass. A man has been throwing objects, ...

Sydney Festival 2016 review: One man's trash an absolute treasure in Object Lesson
The Object Lesson is one of those frog-boiler experiences. Once immersed, you don't realise how thoroughly you are being affected until it's ...

Underwear and socks top rogue objects for dogs and cats
If sock or jocks have gone missing your pet's stomach may well be where they are.

Residents object to mosque in Perth's south concerned about "sexual deviancy of Muslims".
Residents living near a proposed mosque in Perth's south have objected to the place of worship concerned about the &quot;violence and sexual ...

This Advertising Executive Reminds Her Industry That Women Aren’t Objects
... Badger is facing. The advertising executive in charge of Badger & Winters created a video documenting just a few examples of women objectified ...

Relativity Objects To Paying Bankruptcy Consultant
Relativity Media said today that its Official Committee of Unsecured Creditors plans to file an objection in U.S. Bankruptcy Court over the fees ...

This is the first object 3D-printed from alien metal
So-called "asteroid mining" company Planetary Resources is built on the belief that asteroids and other objects in space are loaded with resources ...

Take A Trip Around The World Through 1,300 Design Objects
... Haar Romeny opened Kiosk in 2005. The SoHo boutique, which closed its brick-and-mortar location in 2014, celebrated everyday and esoteric objects ...

South Korea fires warning shots after unidentified North Korean object flies near border
South Korea fires warning shots after unidentified North Korean object flies near border

Resources last updated: 1/31/2016 3:30:09 AM