#401 doc about contination character

open
Mark Hessling
5
2013-01-24
2013-01-24
Anonymous
No

The Regina PDF document is scarce about REXX statement continuations, the
best described stuff is, of all places, under the CALL instruction.

The PDF doc mentions a line continuation character, but doesn't (at that
point) mention what that character is.

Also, does the "line continuation character" continue a line, or a REXX statement?
If it's a line continuation, then a "line" should be defined.

The subject of continuations should have its own section, possibly under
Definitions [2.1].

Also (under Definitions [2.1], it mentions if the last token is a
line continuation character ...

It's not apparent, but the following is also a continued REXX statement:

if x==b | x==c & , /*is it good so far...? */
x>z then say 'Eureka!'

where the comma isn't the last token on the line.
Some casual readers may not appreciate the difference between
a token, a clause, or a REXX statement.

Also, because of the way one would continue the statement:

if funkyTown(thisIsOneHeckOfA_,,
thisWouldBeTheSecondArgument, ,
thisWouldBeTheThirdArgument) ==0 ,
then say 'passed'

... it would be a good idea to show an example or two similar to this
as well several generic examples (and better formatted, of course).

A note could probably be added specifically mentioning that
a multi-line literal (of any type) can't be continued with a
continuation character.

Also, I think Regina should check for the error:

if x==2 then say 'ya have it' ,

where the above REXX statement is the last line in the file,
and no continuation exists, even though the comma
indicates that the REXX statement is to be continued.

It may not be a true illegal error, but the intent of the
programmer clearly intended that the statement is
continued, and perhaps absentmindedly omitted it
or never finished coding it --- but it would make some
reader wonder what's what.
_________________________________ Gerard Schildberger

Discussion