On Fri, 14 Jun 2013 13:00:50 +0200, Thomas Berg wrote:
>The reason for stem. = '' is that I have a usage of the value ''. Among other
>uses I often test if stem.xxx == '' for processing reasons.
>
An alternative is to use the SYMBOL() function to test whether a variable has
been assignec a value. Useful particularly when '' may be a valid value among
your data.
>I always have Signal On Novalue.
>
I consider this good practice.
On Fri, 14 Jun 2013 10:53:31 +0000, Hunkeler, Peter (TLSG 4) wrote:
>>stem. = ''
> ...
>I don't use this default value assignment mechanism for ...
>
Be careful not to use the word "default" when describing this assignment.
(I carelessly did so a couple days ago.) The correct description, from the
Rexx reference is:
... Further, when a stem is used as the target of an assignment, all
possible compound variables whose names begin with that stem
receive the new value, whether they previously had a value or not.
Following the assignment, a reference to any compound symbol with
that stem returns the new value
| until another value is assigned to the stem or or that stem or
| individual variable is dropped .
Thinking in terms of "default" can cause one to overlook the consequence
of the clauses:
o ... whether they previously had a value or not.
o until ... that ... individual variable is dropped .
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN