MainframeSupports
tip week 42/2002:

You probably know that REXX allows you to use @, #, $ and _in variable names. But what about ? and !. According to the manual a variable name can start with any character that is not a digit or a period (.). If this is true then operators like *, +, / and - are permitted, but this is not true. Well, this piece of code will work:

/* REXX */
? = 2001
! = 2002
_ = 2003
@ = 2004
# = 2005
$ = 2006
SAY ! ? _ @ # $

To my danish readers I have to say click here and that ! is not used as an operator in english versions of REXX. ! is replaced by |. Many of my danish readers know, that @, # and $ are the same as Æ, Ø and Å (not neccesarily in this order, I have forgot the correct translation). Well, back to the point, _ is valid as the first character in REXX, but not in PL/1 and DB2. ? and ! are totally out of the question in other languages as part of any variable name.

This new knowlegde may give you some new ideas. What about using ? = MY_PROCEDURE instead of CALL MY_PROCEDURE. I haven't found out about the subtile differences between argument parsing when using CALL compared to a function reference, so this trick can save me some headaches. And maybe we can produce REXX programs that are just as unreadable as C and C++ programs can be.

Previous tip in english        Sidste danske tip        Tip list