There is no bug.  There may be a design and/or implementation deficiency, but 
that is another matter.
 
Trouble comes when the SPMs are used by people who do not/cannot write macro 
definitions.
 
Consider the macro instruction
 
|          gubbins mcguffin=(1,A,@now),and,(4,&switch)
 
As it is coded here this gubbins macro instruction has three arguments, one 
corresponding to the
keyword parameter &mcguffin, which must exist and which has a list as its 
value, followed by two positional arguments that may well correspond to, 
usually do correspond to (the first two) positional parameters, but need not do 
so.  These two positional arguments need not correspond to positional 
parameters, which need not exist. 
 
It has always been licit to write a macro definition and macro instructions 
that pick off varying numbers of not necessarily declared positional arguments, 
processing each of them until they are exhausted.
 
Statements like
 
|&npa     seta   n'&SYSLIST         --obtain positional-argument count
 
followed by others of the form
 
|&i        seta    0
|.palist_loop anop
|&i        seta   &i+1
|&eol    setb   (&i gt &npa)
|           aif     (&eol).palist_lend
|  <process SYSLIST(&i) value>
|           ago    .palist_loop
|.palist_lend anop 
 
are commonplace, much used, and very useful.
 
Consider now
 
|          DO UNTIL=((CR,R1,LT,R2),AND,(CR,R3,LT,R4)
 
Things have changed  This macro instruction has a single keyword argument the 
value of which is a three-element list, of which
 
o the first is a four-element sublist,
 
o the second is a scalar, and
 
o the third is again a four-element sublist.
 
In this second case diagnosis of errors/usage lapses is possible; but if, as 
here, both
 

|          DO UNTIL=((CR,R1,LT,R2),AND,(CR,R3,LT,R4)
 
and
 

|          DO UNTIL=(CR,R1,LT,R2)
 
are licit, deducing the intent of the writer of a macro instruction will be 
difficult.
 
I conclude that putting SPMs into the hands of people who do not write macro 
definitions with facility is unwise.  Beguiled by dubious analogies with 
constructions in statement-level procedural languages, they will misuse them 
and then complain about the troubles that result.
 
Let me end on a linguistic note: 'Otiose' means dispensable, sans raison d'ĂȘtre 
(or, on occasion, faineant).  'Extra' positional arguments instead have 
important uses.
 
John Gilmore





 






 

 

|          DO UNTIL=(CR,R1,LT,R2),AND,(CR,R3,LT,R4)
 
It  is a macro instruction having three arguments.  The first corresponds to 
the keyword parameter &UNTIL, and its value is a four-element list.  The second 
corresponds to a first positional parameter if there is one, in which case it 
can be accessed by name.  The second is also a positional argument, and its 
value is also a four-element list.  This macro instruction is 
 
Writing
 

|          DO UNTIL=((CR,R1,LT,R2),AND,(CR,R3,LT,R4))
 
changes 
     

John Gilmore Ashland, MA 01721-1817 USA

                                          

Reply via email to