Hello all from a newcomer to this list,
Here is a function for only 1 condition but 3 cases : if it can be
useful to anyone
trif: func [
condition
iftrue [block!]
iffalse [block!]
ifnone [block!]
] [
do either condition [
iftrue
] [
either none? condition [
ifnone
] [
iffalse
]
]
]
; example:
print trif request "give an answer" ["yes"]["no"]["cancel"]
by the way,
is it good that "not none" equals "true" ?
Alain Goy�.
>
> Oops, should be > 3 cases.
>
> Anton.
>
> > do select reduce [...] is only better in code-size
> > for > ~8 cases.
>
> --
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.
>
>
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.