× RexxLA Home About RexxLA About Rexx Community Members Symposium

Contact Us

The Rexx Language - ANSI Rexx Standard Errata

ANSI Rexx Standard Errata

Rexx ANSI Standard Errata

This errata to X3.274-1996 is in sections:

  • Clerical: Changes that are simply clerical corrections, and the reader was not likely to have been misled.
  • Corrections: Changes that change the language specified, correcting flaws or omissions.
  • Unchanged: Places where no correction is required now, but extra explanation might be desirable in a future version.


5.2.1 "Streams has components for the default input stream to be used and the default output stream to be used".   That should be "output streams" plural to allow for default error stream.

5.10.1 # marks were left off Limit_MessageInsert and Limit_TraceData. Hex_string: 4th. sentence - "0 to 7 digits are added..." should be "Zero or 4 digits are added...." since this covers the actual possibilities. In the next to last paragraph remove "in the following token".  The subsequent test is for blanks between tokens.

*7.4.7 "Config_Compare(Config_Substr(lhs),Config_Substr(rhs))" to       "Config_Compare(Config_substr(lhs,n),Config_Substr(rhs,n))"

*7.4.10  Change "to expressed" to "to be expressed"

*8.3.5 Replace "index" by "pos"

8.3.6 Change "then #Raise" to "then call #Raise" in three places. Change "then #Raise" to "then call #Raise" Change "then #Raise" to "then call #Raise" in three places.

*8.3.17 Replace "ArgNum" with "#ArgNum"

9.3.20, 9.3.21 Change "#Bif_Arg.2" to "#Bif_Arg"

9.7.8 Change ')' to '))' just before the first '==".

*9.5.3 Change "ConditionInstruction = ''" to "ConditionInstruction.#Level = ''"

*9.7.4 Change "#Linein.Position" to "#Linein_Position"

Corrections In the next to last paragraph remove "in the following token".  The subsequent test is for blanks between tokens. Add an optional label list, [label_list], as a possible start to a program.  It was never intended to prohibit this.,  Change [ncl] to ';'+.  This disallows labels before the THEN keyword.  The semicolon repetition is made mandatory because 6.2.3 says a semicolon is supplied before THEN. (Although other ways of specifying the same thing are possible.)  Change to numeric_form:='FORM' [numericformsuffix] and define numericformsuffix as the part of after 'FORM'.  Change numericsuffix in to numericformsuffix. It was never intended to prevent defaulting of the FORM. Remove the special case for Msg10.2.  (It is of dubious benefit to that message and introduces inconsistency with message 28.3) The insert <keywords> should be in alphabetical order and upper case.

* As an addition to the section about 'position': "In deciding the leftmost blank in a quoted string of radix 'X' or 'B' that is erroneous note that:

  • A blank as the first character of the quoted string is an error.
  • The leftmost embedded sequence of blanks can validly follow any number of non-blank characters.
  • Otherwise a blank run that follows an odd numbered sequence of non-blanks (or a number not a multiple of four in the case of radix 'B') is not valid.
  • If the string is invalid for a reason not described above, the leftmost blank of the rightmost sequence of blanks is the invalid blank to be referenced in the message."

*7.5.4 The name used in the invocation is held in #Name.#Level for possible use in an error message from the RETURN clause, see 8.3.22.

8.2.1  #ErrorText.0.1 - needs an extra blank at end, following colon.

  • #ErrorText.0.2 - ditto.
  • #ErrorText.13.1 - change to 'Invalid character "('<hex-encoding>'X)" in program'.  The committee did not intend there to be a <char> insert since if that was a control character the output might show strangely.

*8.2.4 At beginning, add:

  • "if #InhibitTrace > 0 then #InhibitTrace = #InhibitTrace - 1"

*8.3.6 The three lines starting "#StartValue.#Loop = " to be replaced by:   

  • #StartValue.#Loop = #Evaluate(assignment, Expression)
    if datatype(#StartValue.#Loop) \== 'NUM' then
       call #Raise 'SYNTAX', 41.6, StartValue.#Loop
    #StartValue.#Loop = #StartValue.#Loop + 0

8.3.6 The line six below the IterateLabel in 8.3.6 should say 'assignment' where it now says 'byexpr'.  (Thanks to Ian Collier for reporting this one.)

8.3.6 Following the label OnceLabel, delete "else nop".  This was a clerical error, but not obviously so.  As a matter of coding style, a do-end around the subject of the following ELSE is desirable.

8.3.8 and 8.3.22 should say "At this point the clause termination occurs and then:" before the changes to #Level and #Pool. (This achieves compatibility with most existing implementations about whether any exceptions signaled are raised in the caller or the callee.)

*8.3.18 The line that starts "if \#AllowProcedure" should be:

  • "if \#AllowProcedure.#Level then call #Raise 'SYNTAX', 17.1
       #AllowProcedure.#Level = 0"

* The paragraph that starts "Otherwise #TraceSource..." should start:  "Otherwise, unless the current clause is a null clause, #TraceSource..."

*9.2.1 The line that says "/* Allow leading '?'s */" and the following four lines to be replaced by:

  • Val=Value
     /* Allow '?' alone */
     if Val \== '?' then do
        /* Allow leading '?' */
        if left(Val,1) == '?' then Val = substr(Val, 2)
        if pos(translate(left(Val,1)),'ACEFILNOR') = 0 then
          call Raise 40.28, ArgPos, Type, Val

9.3.21 The default value for the third argument should be Length=max(length(String)+1-Num,0) where it now says Length=length(String)+1-Num (Thanks to Mark Hessling for reporting this one.)

*9.5.9 and elsewhere.  All references to the field "Interacting." to be replace by references to "Interactive.".

*9.5.9 The line "if Value='' then #Interacting.#Level='0'" and two following to be replaced by:

  • "#Interacting.#Level='0'
    /* A question mark sets interactive tracing */
    if left(Value,1) == '?' then do"

*9.5.9 Change the line starting "/* The default..." and the four lines following to:

  • /* Absence of a letter leaves #Tracing. unchanged */
    if Value \== '' then do
       Value = translate(left(Value,1))
       if Value = 'O' then #Interacting.#Level = '0'
          #Tracing.#Level = Value

9.8.1 There was an error in checking that the year of the date was in range.  Code for a new version is on this website.

9.8.5 There were errors in how the time was represented, particularly the first hour of the day.  Code for a new version is on this website.

9.8.6 Change "do forever" to "do until p=length(Subject)"


Nothing needs to be said about "Numbers used directly by Rexx" ("The Rexx Language" p137) since sections 4.2 and A.4.2 apply generally.  The committee would expect integers up to at least 999999999 to be supported in these contexts.

LOSTDIGITS, page 50, is not in the index.

6.4.6 Nothing is said about splitting messages to make them multiple shorter lines, for easier reading. This is deliberate - each message is defined as a single string.  Note however, that a conforming implementation could reformat the string after the string was produced, as part of the configuration activity of displaying it. The "within quotes" does not apply to anything in the standard, but is harmless and might be relevant to messages in a subsequent standard. Note that message 15.3 does not specify a position and hence leaves undefined what <char> insert should be in the case of multiple errors.  The committee expects the leftmost wrong character to be used as the <char>.

6.4.1 or 6.4.5 could perhaps be altered to make clear that message 28.1 is preferred to 28.3 when both are applicable. Similarly 28.2 and 28.4

*7  Since the operands of an operation are evaluated left before right it is not necessary to have a general rule for expressions - the left to right rule follows by induction.

8.2.1 Msg30.2 is not ideal for hexadecimal and binary strings because it is the length of the converted string that is tested.  However, the actual literal will be longer than it's converted value.

8.4.2 The presence of a prefix to the message is implied by, but it would be clearer if this was explicit in 8.4.2

Questions regarding this errata may be directed to the X3J18 committee chairman, Dr. Brian Marks.