home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
123rexx.zip
/
REXXARGS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-10-21
|
2KB
|
34 lines
/*****************************************************************************/
/* Lotus 1-2-3 For OS/2 sample @function. */
/* */
/* @REXX("REXXARGS.CMD",[arg1,arg2...]) */
/* */
/* Returns the number of arguments passed to it. */
/* */
/* @REXX("REXXABRV.CMD logFileName",[arg1,arg2...])) */
/* */
/* Writes any TRACE or SAY output to a log file named 'logFileName'. */
/* */
/* Copyright (c) 1991 Lotus Development Corporation. This code is supplied */
/* on an 'as is' basis as an example only. This code has only received */
/* informal testing by Lotus. Permission is granted to copy and modify */
/* this code to your heart's content. No warrenties expressed or implied. */
/* Remember, your mileage may vary. Let us know if you find support of REXX */
/* by 1-2-3 useful. */
/*****************************************************************************/
PARSE ARG arg.1, arg.2, arg.3, arg.4, arg.5, arg.6, arg.7, arg.8, arg.9, ,
arg.10, arg.11, arg.12, arg.13, arg.14, arg.15, arg.16, arg.17, arg.18,
arg.19, arg.20
IF arg.1 = "?" THEN SIGNAL Tell /* give info if called with "?" as 1st arg */
numArgs = 0
DO i = 1 TO 20 /* loop through the arguments */
IF arg.i <> "" THEN /* do we have an argument here? */
numArgs = numArgs + 1 /* bump the count of args we were passed */
END
RETURN numArgs
Tell: /* return a brief description */
RETURN '@REXX("REXXARGS.CMD",[arg1,arg2...]) ==> returns number of args',
"it was passed."