CONTENTS | INDEX | PREV | NEXT
7.0
SYNTAX : ARG @M
RESULTING RANGE : Depends on ARGUMENT, see there.
FUNCTION : Return information about the argument, range or list
the current macro was called with. The ARGUMENT decides
what information is generated. This command is only valid
within a macro; any other use will generate an error.
ARGUMENT : Which of the three possible parameters to return
information for:
1 : Returns whether an argument, range or list was present
in the call to M or not (first returned value of the
RANGE is 1 if so, 0 if not), and the value of the
ARGUMENT (or of the first value of the RANGE or LIST
if applicable) as second value of the returned RANGE.
If returned value 1 is 0, the second value does not
mean anything (it will be 0, but not valid).
2 : Returns whether a range or list was present in the
call to M or not (first returned value of the RANGE
is 1 if so, 0 if not), and the second value of
the RANGE or LIST (if applicable) as second value of
the returned RANGE. If returned value 1 is 0, the
second value does not mean anything (it will be 0,
but not valid).
3 : Returns whether a list was present in the call to M or
not (first returned value of the RANGE is 1 if so, 0
if not), and the third value of the LIST (if
applicable) as second value of the returned RANGE.
If returned value 1 is 0, the second value does not
mean anything (it will be 0, but not valid).
Other values are not allowed.
EXAMPLE : 3 @m=
Will display a range, depending on how the active macro was
called. Remember, that this must be code inside a macro. If
that macro was called with, say, 7,8,9 , the output will
be 1,9 .
NOTE : As soon as this command is encountered in a macro, the
macro will no longer see its argument as a number of times
to execute. It will execute just once. However, the loop
can be programmed back in easily via the @M command:
2 @M U12 Q1 < Q2 < ... > >
MATRIX