At 08:31 -0500 on 11/03/2013, John Gilmore wrote about Re: Some Help
with Conditional Assembly:

Binary/boolean set-symbol values may be used freely in arithmetic
statements, often very conveniently.  Thus Robert Rosenberg's IFy
logic becomes

|&length_in setb (t'&L ne 'O')
|&source_in setb (t'&SOURCE ne 'O')
|&target_in setb (t'&TARGET ne 'O')
|&nparms seta &length_in+&source_in+&target_in

That way also works. My major point is to make sure that one and only
one of the parms has a value to catch the more than one parm has a
value as well as none of the parms have a value cases. Otherwise you
will generate bad code. If you look at IBM macros, you will see that
they do this type of sanity check by spotting mutually exclusive
parms as well as cases where parm1 needs parm2 and you have a parm2
with another parm that is mutually exclusive with parm1 (ie: You can
either have parm3 OR need both parm1 and parm2 together).


BTW: My code should have been:

.NOTARGET AIF (&PARMS EQ 1).PARMSOK   (no T')
           MNOTE 4,'EXACTLY 1 PARM MUST BE DEFINED'   BETTER MNOTE TEXT

Reply via email to