[REBOL] Re: Access to script arguments
From: tim:johnsons-web at: 23-Nov-2001 18:39
On Sat, Nov 24, 2001 at 01:31:07AM +0000, John R wrote:
> Hi all,
>
> When I try to use/access script arguments they always seem to be set to none
> e.g.
>
> do %script1.r /args "testarg"
Hi John:
I should have been more clear in my last...
;here's a short example script: name is testargs.r
REBOL[]
print "args:"
args: parse system/script/args none
?? args
;from the command line:
>> do %testargs.r "one two three"
Script: "Untitled" (none)
args:
** Script Error: parse expected input argument of type: series
** Near: args: parse system/script/args none
??
; now try
>> do/args %testargs.r "one two three"
Script: "Untitled" (none)
args:
args: ["one" "two" "three"]
== ["one" "two" "three"]
; does that help?
tj
> In script1.r
>
> print system/script/args
>
> gives none
>
> John
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.johnsons-web.com