I thought IBM made Object Rexx available for L390 some time ago. It allows
classical Rexx programming and has OO capabilities which, for example, let
you do something over all the members of a set (it has several collection
classes).

Mike Harding
EDS VM National Capability
134 El Portal Place
Clayton, Ca.  USA  94517-1742

* phone: +01-925-672-4403
*  Fax: +01-925-672-4403
* mailto:[EMAIL PROTECTED]   * <mailto:[EMAIL PROTECTED]>
(personal)



-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of John
Ford
Sent: Friday, February 20, 2004 7:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Just stirring the pot


On 2/19/2004 2:25 PM Adam Thornton wrote:
<snip>
> There's no way in Rexx to get a list of all the key
> names in the key/value pairs that make up a stem.  I find that a huge
> problem in terms of conceptualizing problems the intuitive way for me.

I've resorted to using a second compound variable to keep track of the of
the first compound variable [warning: following code is off the top of my
head]...

  MainStem. = '00'x  /* default value for unused keys */
  TailStem. = ''
  TailStem.0 = 0

  x = 'Something to put in stem variable'
  y = 'key of Something'

/* to add/update a key-value pair */
  if MainStem.y = '00'x then do  /* add new key? */
     i = TailStem.0 + 1
     TailStem.i = y
     TailStem.0 = i
     end
  MainStem.y = x

/* extract key-value pairs */
  for i = 1 to TailStem.0
    y = TailStem.i
    say y '=' MainStem.y
  next i

I agree that access to tail values would be a dandy addition to the
language, either as a function or using some other syntax. I know some folks
have written assembler functions to extract compound symbol's tails.

--
jcf ~ zjcf at Dawn and John dot net
Always ready to talk Rexx.

Reply via email to