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

[REBOL] Re: [Function] with [Variable number of args]

From: cyphre:seznam:cz at: 6-Apr-2004 9:23

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" ][ get v ] ] ] ]
>> f 1
a 1 b not defined c not defined d not defined e not defined
>> f 1 2 3
a 1 b 2 c 3 d not defined e not defined
>> f 1 2 3 4 5
a 1 b 2 c 3 d 4 e 5
>>
regards, Cyphre