When passing arguments to a function or a subroutine, you can specify multiple strings to be parsed. The ARG, PARSE ARG, and PARSE UPPER ARG instructions parse arguments. These are the only parsing instructions that work on multiple strings.
To pass multiple strings, use commas to separate adjacent strings.
CALL sub2 'String One', 'String Two', 'String Three'
:
:
EXIT
sub2:
PARSE ARG word1 word2 word3, string2, string3
/* word1 contains 'String' */
/* word2 contains 'One' */
/* word3 contains '' */
/* string2 contains 'String Two' */
/* string3 contains 'String Three' */
The first argument
is two words "String One" to parse into three variable names, word1, word2, and word3. The third variable, word3,
is set to null because there is no third word. The second and third
arguments are parsed entirely into variable names string2 and string3.For more information about parsing multiple arguments that have been passed to a program or subroutine, see section Parsing Multiple Strings.