Rick -
I have been having a long running discussion with Fernando on some other
topics and this came up. This is definitely a bug in 4.0 IMHO. Any time
you use a quoted string as the stem tail it trys to pass that string to
the address environment for processing. Here is some sample output from
rexxtry.rex.
a."xxx yy z" = 'hello'
sh: 0: command not found
rc = 127 ...................................... rexxtry.rex on LINUX
Am I just off my rocker? This has got to be a bug.
David Ashley
-------- Original Message --------
Subject: Re: Fwd: stems
Date: Fri, 20 Nov 2009 11:41:05 +0100
From: FERNANDO MANSITO CABALLERO <[email protected]>
To: David Ashley <[email protected]>
Dear Mr. Ashley,
Thanks you very much for your patient and kind explanation.
If you allow me, although the two expressions are indeed completely
different the result of the two of them is the same: at present you can
use any string enclosed in square brackets as a tail component, but
/only if it is the final component:/
//
*a.[o sole mio] = "che si fa" --> che si fa*, but *a.[o sole mio].1 = "a
la una" --> 0 is not a command*
*a.["o sole mio"] = "e non si fa" --> e non si fa*, but *a.["o sole
mio"].a = "y a las dos" --> 0 is not a command*
Although I would never imagine that there be no pertinent reasons for
the present situation, for my purposes I would prefer that issue solved
the "tolerant" way (use any string as a tail component) and please not
the reverse (illegalise the use of any bracketed string as the ending
component).
By the way, rule 1 (quoted strings become indexes) does not seem to
work: *a."o sole mio" = "hello" --> 0 is not a command, a."pppp" =
"hello" --> 0 is not a command* (!)
If I may, I have also noticed that if you EXPOSE a stem from within a
PROCEDURE, USE ARG it and change some components, the stem reverts to
uninitialised or, there being a default, to that default for all the
unchanged components unless you recur to RETURNing the stem, which may
be a bit rigid.
Thank you very much again for your patience and best regards
fernando mansito
On Wed, Nov 18, 2009 at 9:57 PM, David Ashley
<[email protected] <mailto:[email protected]>> wrote:
Fernando -
I believe your problem in the understanding of what is really going
on with the stem tail evaluations.
a.[o sol mia] is NOT equivalent to a.["o sol mia"]
When Rexx evaluates a stem tail one of two things happen.
1. If the tail contains quotes strings then then the quoted string
become the index.
2. If the tail contains unquoted strings then they are considered to
be variable references and the value of the variable is substituted.
If that variable is not defined then the name of the variable is
converted to upper case and then substituted.
Thus for your example
a.[o sol mia] is equivalent to a.["O SOL MIA"] since none of
those tail variables has been defined. Thus a.["O SOL MIA"] is not
equal to a.["o sol mia"]. Those are two different indexes.
I hope this helps. If this is unclear please let me know.
David Ashley
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel