At 07:17 PM 9/23/99 -0400, [EMAIL PROTECTED] wrote:
>i have been using system/script/args
>...
>unfornately something like "arg1 arg2 arg3" is returned and i haven't been
>able to separate the arguments...

Try parse.  Presuming you want a block of strings:

    >> s: "arg1 arg2 arg3"
    == "arg1 arg2 arg3"

    >> myargs: parse s none
    == ["arg1" "arg2" "arg3"]

If you invoke REBOL from the command line as:

    rebol myarg1 myarg2 myarg3 myarg4

...REBOL consumes the first argument as a potential script name.
If myarg1 is a runnable REBOL script, it is executed.
If myarg1 is NOT a runnable REBOL script, it is silently discarded.

The rest of the args are aggregated into system/options/args:

    >> system/options/args
    == "myarg2 myarg3 myarg4"

Individual args can be extracted as before, using parse:

    >> myargs: parse system/options/args none
    == ["myarg2" "myarg3" "myarg4"]

-Peter

Reply via email to