On 18 October 2018 at 11:34, Jonathan Scott <jonathan_sc...@vnet.ibm.com> wrote:

> I check for ('&SYSLIST(n)' EQ '') where n is one more than the valid
> number of positional parameters.  I do this rather than checking
> N'&SYSLIST so that it will tolerate a trailing comma, for example when
> a macro has one positional parameter which is optional, so the user has
> coded a dummy comma operand, which causes N'&SYSLIST to be set to 2 even
> though only one positional operand is allowed.

This "comma counts as a positional" has annoyed me for ages. The
classic case for the comma is where the macro accepts positional(s)
and you have change markers as comments somewhere on the right of each
line. A very few IBM macros fail on this, and I've fixed a number of
our local ones.

Tony H.

Reply via email to