I started out with much energy, and am now floundering on the simplest things.

I cannot get *anything* to do with command line arguments to work at all.
I have tried c&p-ing examples from messages here, and they don't work.

(Well... K.R.'s path example seemed to work for what it was worth, 
and I now surround the inner part of each script with:
-------------------------------------------------------------
savecd: system/script/parent/path
...
change-dir savecd
-------------------------------------------------------------
so I don't have to change-dir back after every do %...)

Anyway, something as simple as...

>> do %projects/test/params.r "doggy"
(alternately: do %projects/test/params.r doggy
          or: do %projects/test/params.r [doggy]
          or: do %projects/test/params.r ["doggy"])

params.r (just the guts, ma'am)
-------------------------------------------------------------
; yeeth! just gimme the first one!
either string? system/script/args [
        args: parse system/script/args none
        print args/1    
        
][
        print "No arguments passed."
]
-------------------------------------------------------------
or should that be:
-------------------------------------------------------------
; by this time, I really don't care if there were no params!
args: parse system/script/args none
forall args [
        print args/1
]
-------------------------------------------------------------
finally:
-------------------------------------------------------------
>>do %something "please!"
-------------------------------------------------------------

I've tried every combination I can think of for the last hour without success.
Like using system/options/args... different looping constructs, different number
of parameters on the command line, etc. If anyone wants to observe me losing it
in detail, I can send a copy (13K) of my last session history on request. 

Going (?) nuts.

-- 
Pete Wason|"LWATPLOTG"|[EMAIL PROTECTED]|[EMAIL PROTECTED]|CUCUG|TA|PHX

PS: This whole thing strikes me as kind of funny, since the first thing I did in
rebol was a directly interpreted one-liner that checked a webserver for its
status and sent an email if it was down -- which worked on the first try. Maybe
it was something I ate for breakfast...

Reply via email to