Hi lb,
The reason is that the /args refinement only take one argument (ie. do/args
takes two).
If you want to pass more than one argument to the script, you have to enclose
them in [], like:
do/args %test.r [10:30 %bob http://ed <http://ed> "hello" 'whatever]
To understand why, consider this:
>> print 1 2 3
1
== 3
REBOL see the word 'print and begins evaluating it, it is discovered that
print takes one argument, which is then pulled from the command-line (the 1).
1 is printed. Afterwards 2 is evaluated, and last 3, which is regarded as the
result of the statement/line/whatever and shown as "== 3".
Makes sense?
Best regards
Thomas Jensen
On 14-Oct-99, [EMAIL PROTECTED] wrote:
> I'm new to rebol and trying to figure out how to deal with arguments. I
> have a script file, test.r, who's
> sole line is:
>
> probe system/script/args
>
> When I execute the following from within rebol
>
> do/args %test.r 10:30 %bob http://ed <http://ed> "hello" 'whatever
>
> all I get is
>
> Script: "test" (none)
> 10:30
> == whatever
>
> Why aren't all the arguments in the probe? Why is the last arg always
> echoed? And how do you get each individual argument into a variable?
>
> Thanks,
> lb