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... probe my-var The value of my-var will not be passed as the second argument of f, because we remembered the parens. Aren't we lucky? Because of problems like these, I decided to avoid using optional arguments in general. I use it in one or two command-line functions, but these I never use in scripts. I think if you want to play the language game, go the parse way. Anton. > 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 it. Robert -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.