New Rexx Book: Rexx Programmer's Reference - REXX
This is a discussion on New Rexx Book: Rexx Programmer's Reference - REXX ; In a previous episode of comp.lang.rexx, Dennis Lee Bieber was heard to
say:
....
>whereas the safe version would have quoted the "keys"
>
> var."CHERRY"
That doesn't do what you seem to think it does.
--
---- Ian Collier ...
-
Re: New Rexx Book: Rexx Programmer's Reference
In a previous episode of comp.lang.rexx, Dennis Lee Bieber was heard to
say:
....
>whereas the safe version would have quoted the "keys"
>
> var."CHERRY"
That doesn't do what you seem to think it does.
--
---- Ian Collier : imc@comlab.ox.ac.uk : WWW page (including REXX section):
------ http://users.comlab.ox.ac.uk/ian.collier/imc.shtml
New to this group? Answers to frequently-asked questions can be had from
http://rexx.hursley.ibm.com/rexx/ .
-
Re: New Rexx Book: Rexx Programmer's Reference
Dennis Lee Bieber wrote:
> whereas the safe version would have quoted the "keys"
>
> var."CHERRY"
If you need that level of protection, then you use Open Object Rexx which supports [] syntax to the stem class which what you have above would actually become...
var.["CHERRY"]
Mind you, Rexx was invented in such a way so as to be a powerful, productive, intuitive language, not a punitive, restrictive, and requiring of 6 different syntax requirements to make sure you really
wanted to compute 2+2 before it will do it. It should be up to the programmer to only input the exact instructions they desire to be executed into their program. Excessive safety guards in what must
be typed does not protect the fool, and only annoys the guru.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/
Remove the upper case letters NOSPAM to contact me directly.
-
Re: New Rexx Book: Rexx Programmer's Reference
On Mon, 20 Jun 2005 12:34:16 GMT, Lee Peedin
<lpeedinREMOVE@UPPERCASEnc.rr.com> wrote:
> Howard's new book has been referenced numerous times both here and
> on the RexxLA list.
True, it has been. I was thinking, though, that anyone who browses the
archives might have an easier time finding out about (and deciding
whether or not to buy) the book if it had its own thread. I had,
somehow, missed every reference to the book, even though I enjoy
reading this group.
--
Michael DeBusk, Co-Conspirator to Make the World a Better Place
Did he update http://home.earthlink.net/~debu4335/ yet?
-
Re: New Rexx Book: Rexx Programmer's Reference
On Mon, 20 Jun 2005 09:51:32 -0500, Mark Dodel <madodelNOSPAM@ptd.net> wrote:
> Its been discussed. There is supposed to be new OS/2-eCS news
> service that is an RSS feed for web sites that would in part be fed
> by the VOICE News list, but every time I ask about it I'm told "next
> month". I'll ask again.
RSS is a breeze. I've been messing with it and find it so simple and
useful that I'm amazed everybody doesn't use it for something.
--
Michael DeBusk, Co-Conspirator to Make the World a Better Place
Did he update http://home.earthlink.net/~debu4335/ yet?
-
Re: New Rexx Book: Rexx Programmer's Reference
On Mon, 20 Jun 2005 10:01:11 +0200, rony <Rony.Flatscher@wu-wien.ac.at>
declaimed the following in comp.lang.rexx:
>
> Well, looking at your example, that is *exactly* what the result should be, even if you seem to be
> surprised.
>
No, /I'm/ not surprised... But to a newbie, it is not made clear
that the book examples will not behave properly if those stem
indices/keys should ever be the target of an assignment between their
/uninitialized/ state when used to initialize the array, and some
subsequent use where they might have taken on a value.
He does mention, after the fact, that things were uppercased --
but it wasn't brought out that this was because the indices were treated
as uninitialized variables so the variable name became the value of the
key.
{okay, my Q&D example of var."key" isn't correct either; the gist of my
view is that the book could be misleading a beginner as too many of the
examples rely on the use of the translation of uninitialized variables
into uppercase string literals, without explicitly explaining that they
/are/ considered variables...
month.1 = january
say month.1
=> JANUARY
only works because january /was/ undefined in the example. Yes, he then
goes on to suggest using quotes to get an output form of January -- but
why compound the explanation of "arrays" when a simple
month.1 = "January"
gets to the final usage of human output -- that "array month, element 1,
is given the string literal of January" vs the mental sequence of "array
month, element 1 is given the current value of the variable january; the
variable january is uninitialized so the language returns the variable
name as the value, and it is in uppercase because the entire statement
was uppercased by the language processor before statement execution".
I find that rather much to inflict upon a beginner and,
regardless of the book title, those early chapters are more beginner
tutorial than "reference".}
--
> ============================================================== <
> wlfraed@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed@dm.net | Bestiaria Support Staff <
> ============================================================== <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <
-
Re: New Rexx Book: Rexx Programmer's Reference
Hi Dennis,
> No, /I'm/ not surprised... But to a newbie, it is not made clear
> that the book examples will not behave properly if those stem
> indices/keys should ever be the target of an assignment between their
> /uninitialized/ state when used to initialize the array, and some
> subsequent use where they might have taken on a value.
>
> He does mention, after the fact, that things were uppercased --
> but it wasn't brought out that this was because the indices were treated
> as uninitialized variables so the variable name became the value of the
> key.
See, the respective examples as presented in the book work. There is nothing "unsafe" in there. It
may be a pedagogical discussion how one teaches the behaviour of Rexx w.r.t. uninitialized
variables. Everyone's mileage may vary, but the examples as presented are "safe" and work as
advertised, taking advantage of Rexx' behaviour(s).
---rony
-
Re: New Rexx Book: Rexx Programmer's Reference
On Monday, in article <d95t48$qak$1@trane.wu-wien.ac.at>
Rony.Flatscher@wu-wien.ac.at "rony" wrote:
> Dennis Lee Bieber wrote:
> > The examples all rely upon the use of undefined variables
> > returning there name in uppercase, but don't explain that "var.pear",
> > when "pear" is undefined, becomes "var.PEAR", but if "pear" has a value,
> > "var.pear" becomes "var.<value of pear>"
>
> Right, that is an important feature of Rexx: uninitialized variables take their
> name (in uppercase)
> as their value.
>
> From your post I infer that you have been bitten by an important feature of
> Rexx that you may not
> have been aware of: uninitialized variables take their name in uppercase as
> their values.
That wasn't the inference I reached from his post: rather, he seemed to
be pointing out that someone might write:
var.cherry = 23 /* Deliberately avoiding self-value: it confuses */
-
Re: New Rexx Book: Rexx Programmer's Reference
On Mon, 20 Jun 2005 16:01:42 UTC, Michael DeBusk
<m_debusk@despammed.com> wrote:
> On Mon, 20 Jun 2005 09:51:32 -0500, Mark Dodel <madodelNOSPAM@ptd.net> wrote:
>
> > Its been discussed. There is supposed to be new OS/2-eCS news
> > service that is an RSS feed for web sites that would in part be fed
> > by the VOICE News list, but every time I ask about it I'm told "next
> > month". I'll ask again.
>
> RSS is a breeze. I've been messing with it and find it so simple and
> useful that I'm amazed everybody doesn't use it for something.
>
For the ignorant such as I, what is RSS?
--
John Small
(remove the z's for email address)
-
Re: New Rexx Book: Rexx Programmer's Reference
http://en.wikipedia.org/wiki/Rss
On Mon, 20 Jun 2005 21:01:45 -0000, "John Small"
<zjsmallz@os2world.net> wrote:
>On Mon, 20 Jun 2005 16:01:42 UTC, Michael DeBusk
><m_debusk@despammed.com> wrote:
>
>> On Mon, 20 Jun 2005 09:51:32 -0500, Mark Dodel <madodelNOSPAM@ptd.net> wrote:
>>
>> > Its been discussed. There is supposed to be new OS/2-eCS news
>> > service that is an RSS feed for web sites that would in part be fed
>> > by the VOICE News list, but every time I ask about it I'm told "next
>> > month". I'll ask again.
>>
>> RSS is a breeze. I've been messing with it and find it so simple and
>> useful that I'm amazed everybody doesn't use it for something.
>>
>
>For the ignorant such as I, what is RSS?
-
Re: New Rexx Book: Rexx Programmer's Reference
On Mon, 20 Jun 2005 16:01:42 UTC, Michael DeBusk
<m_debusk@despammed.com> wrote:
-> On Mon, 20 Jun 2005 09:51:32 -0500, Mark Dodel <madodelNOSPAM@ptd.net> wrote:
->
-> > Its been discussed. There is supposed to be new OS/2-eCS news
-> > service that is an RSS feed for web sites that would in part be fed
-> > by the VOICE News list, but every time I ask about it I'm told "next
-> > month". I'll ask again.
->
-> RSS is a breeze. I've been messing with it and find it so simple and
-> useful that I'm amazed everybody doesn't use it for something.
->
Personally I prefer email, but from what I have heard people seem to
like RSS feeds. Unfortunately I just moderate the list, I don't admin
the VOICE server, so I can just ask. Its been promised.
Mark
--
From the eComStation of Mark Dodel
http://www.os2voice.org
Warpstock 2005, Hershey, PA, Oct 6-9, 2005 - http://www.warpstock.org
Similar Threads
-
By Application Development in forum REXX
Replies: 7
Last Post: 02-17-2007, 10:13 PM
-
By Application Development in forum REXX
Replies: 0
Last Post: 08-15-2006, 07:46 AM
-
By Application Development in forum REXX
Replies: 7
Last Post: 05-16-2006, 02:08 AM
-
By Application Development in forum REXX
Replies: 11
Last Post: 02-18-2006, 03:29 AM
-
By Application Development in forum REXX
Replies: 3
Last Post: 01-14-2005, 05:01 AM