Script arguments from console?
[1/5] from: robert:muench:robertmuench at: 17-Sep-2001 19:29
Hi, I have a script which can be called with command line arguments. I'm
accessing the arguments throuh system/options/args. This works fine if the
script is called from a shell but fails if I start my script from the Rebol
console with
>> do ... argument
Than system/options/args is none. Isn't this inconsistent? I would expect the
same behaviour. Robert
[2/5] from: pablohar:hotma:il at: 17-Sep-2001 16:09
help do
USAGE:
DO value /args arg /next
DESCRIPTION:
Evaluates a block, file, URL, function, word, or any other value.
DO is a native value.
ARGUMENTS:
value -- Normally a file name, URL, or block (Type: any)
REFINEMENTS:
/args -- If value is a script, this will set its system/script/args
arg -- Args passed to a script. Normally a string. (Type: any)
/next -- Do next expression only. Return block with result and new
position.
[3/5] from: robert:muench:robertmuench at: 18-Sep-2001 11:11
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 5>>
> USAGE:
> DO value /args arg /next
Hi, well it sometimes makes sense to read the docs for even the most basic words
;-). But why do the arguments will be put into system/script/args whereas
commandline arguments are put into system/options/args? Robert
[4/5] from: pablohar::hotmail::com at: 18-Sep-2001 11:05
Dear Robert
I ALWAYS take the arguments from system/script/args in my shell invoked
scripts.. (I didn't know about system/options/args... I promess to check it
;-) )
[5/5] from: ryanc:iesco-dms at: 18-Sep-2001 9:44
Hey Robert,
they are two different animals. Script/args are loaded rebol code, wherareas
command line args are just strings. It would'nt make much sense to force the
loading of command line args, since some of those may not necessarilly make sense to
rebol when loaded. Forcing script args to strings would work, but you must keep in
mind the args come from two entirely different worlds, both of which have entirely
different ways and standards of communicating.
Actually, I hardly see a use for 'do/args, but I would be willing to bet that Carl
has some grandiose plan for its use not yet quite appearent to us.
--Ryan
Robert M. Muench
wrote:
> > -----Original Message-----
> > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted