Max wrote:
> rebol prefered (and simpler) style:
>
> either none? system/script/args [
> print "no args"
> ][
> print "args waiting"
> ]
Someone else will probably jump on this, but see Zine Issue #2 for style
suggestions on this particular example:
http://www.rebolforces.com/zine/rzine-1-02/#se
Thanks to you all,
Christophe, Cyphre, Volker, Anton and indirectly others too for your comments and
vision about how to effectively use REBOL for
solving the daily challenges we all have as "programmers" ...
Your solutions will be studied diligently since they also showed me other interesting
On Tue, 6 Apr 2004 13:53:53 -0400, you wrote:
>rebol prefered (and simpler) style:
>either none? system/script/args [
thanks, i'll use that instead...
i got the previous style from an example in the rebol library
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED]
On Mon, 5 Apr 2004 23:07:54 +1000, you wrote:
>What was the error ?
this is the section of code in question:
Rebol []
either not system/script/args == none [
arg: system/script/args
arg: parse arg ""
log: to-file arg/1
binkd-log: read/lines log
days: to
> -Original Message-
> From: tony summerfelt [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 1:33 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] command line arguments
>
>
>
> On Mon, 5 Apr 2004 16:25:19 +1200, you wrote:
>
> >> > either system/script/args [
> >> >instead of:
On Mon, 5 Apr 2004 16:25:19 +1200, you wrote:
>> > either system/script/args [
>> >instead of:
>> >> either not system/script/args == none [
>> got an error when i tried that:
>Then you almost certainly have an error in the code before this point. :)
here are the first few lines of the program
Of course, one has to be careful that the result of the
expression following this "magical" function does not
get eaten up by mistake. In this case, you should wrap
in parens. Example (imagine in a script):
(f 1)
; now let's do some real work
; lots of comments...
On Dienstag, 6. April 2004 11:13, Robert M. Münch wrote:
> On Tue, 6 Apr 2004 08:12:01 +0200, Coussement Christophe
>
> <[EMAIL PROTECTED]> wrote:
> > I once use this little trick for handling a variable number of argument:
> >
> > f: func [a [integer!] b [unset! integer!]][either value? 'b [a + b
On Tue, 6 Apr 2004 08:12:01 +0200, Coussement Christophe
<[EMAIL PROTECTED]> wrote:
> I once use this little trick for handling a variable number of argument:
>
> f: func [a [integer!] b [unset! integer!]][either value? 'b [a + b][a]]
Hi, clever! This is a very cool trick... I hope I remember
Hi Gerard,
I'm using simmilar trick to Christophe's.
example:
f: func [
a [any-type!]
b [any-type!]
c [any-type!]
d [any-type!]
e [any-type!]
][
foreach v bind first :f 'a [
print [
v
either unset? get/any v [
"not defined"
10 matches
Mail list logo