[REBOL] Re: Script args
From: btiffin:rogers at: 29-Jul-2007 2:02
I can't say I completely get this either. But for do/args it only works
for scripts. And it always sets system/script/args
>> help do
/args -- If value is a script, this will set its system/script/args
arg -- Args passed to a script. Normally a string. (Type: any)
It's one of those things that takes some getting used to, but it is design
intent. And command line arguments, are best accessed through
system/options/args, but will show up in those other places as one big
string. system/script/parent...isn't set for my Linux version with scripts
that are started up with REBOL.
When you were playing with /something in REBOL it becomes a little weird too.
/anything is a valid REBOL value. It can be passed around, set to variables
etc. a: /abc help a A is a refinement of value: /abc
So if you mistype or misplace an actual refinement, it is just a value (as are
real refinements in the "right" place but in that case the function header
parser does a few other things for you when it detects a "match").
/abc: "test" is a weird one. It will become pretty hard to retrieve without
looking into get and to- functions, maybe some other wierdness. There are a
few REBOL guru's that may explain what's going on.
And yep, it can get confusing as you try and figure out what the lexical
scanner is actually up to sometimes.
Again, hope that helps a little.
On Saturday 28 July 2007 21:12, Jonathan Kelly wrote: