[REBOL] Script args
From: jonkelly::fastmail::fm at: 29-Jul-2007 11:12
I can't seem to get args working?? I'm running View 22.214.171.124.1 (Windows)
Well, I thought before I posted I should check google and found the FAQ
entry. I had mis-read the help text and was using
do %t6.r /args "test1 "test2"
but there was no error, which seems strange. So what is /args in that
expression? Is it a work, but words can't contain the / character. Hmmm
what does this mean ...
>> /args: "testing"
>> print /args
>> print mold /args
>> help /args
/args is a refinement
Anyway, there seems to be some discrepancy anyway.
When I run a script via "rebol t6.r test1 test2", I can see the args in
system/script/parent/args => "test1 test2"
system/script/args => "test1 test2"
system/options/args => [ "test1" "test2" ]
OK, that's good, but what is the script's parent? (the interpeter?)
So, now I want to run this script from another script (or the console).
do/args %t6.r "test1 test2"
the only args that is set is
and that hardly seems simple. But more; when I do
xx: load %t6.r
do/args xx "test1 test2"
NONE of the args is set.
t6.r is ...
Title: "Testing running scripts"
Author: "Jonathan Kelly"
print [ "A" type? system/script/args mold system/script/args ]
print [ "B" type? system/options/args mold system/options/args ]
print "T6 system/script"
print mold system/script
print "T6 system/options"
print mold system/options