Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Script args

From: jonkelly::fastmail::fm at: 29-Jul-2007 17:18

Brian, Brian Tiffin wrote:
> Hi, > > 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 > <snip> > 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) > > 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.
Its best to access system/options/args except that "do/args" only populates the system/script/args. The script has to have special code to deal with whether it's being called directly, or from another script, or you HAVE to use system/script/args, as that's the only consistent data element. Then again, it doesn't work at all if you "load" the script and then "do/args" it. I'd call it a bug, but if it's argued not to be, it surely breaks the "simple" design philosophy. Anyway, it annoys me. :)
> system/script/parent...isn't set for my Linux version with scripts