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

[REBOL] varargs in rebol? Re:

From: jelinem1:nationwide at: 31-Aug-2000 11:11

Passing in a block would probably be the best (most generic) solution. If you have a fixed number of parameters that you could receive, but at times you don't need to pass them all in, you could surround your parameters with parenthesis (in the function call) then check for values of the dummy parameters (inside the function) of unset!. - Michael Jelinek [princepawn--MailAndNews--com]@MailAndNews.com> on 08/31/2000 09:29:13 AM From: [princepawn--MailAndNews--com]@MailAndNews.com on 08/31/2000 09:29 AM Please respond to [list--rebol--com] Sent by: Terrence Brannon <[princepawn--MailAndNews--com]> To: [list--rebol--com] cc: Subject: [REBOL] varargs in rebol? Is it possible to design a rebol function that takes a variable number of arguments, ie: va-func 1 2 va-func 1 2 3 va-func 1 2 3 4 What immediately comes to mind is to use a block for the varargs part of the call, ie va-func 1 [2] va-func 1 [2 3] va-func 1 [2 3 4] But I thought I would just jog the brains of those around me :-) terrence-brannon: [[princepawn--yahoo--com] perl-refugee myth-gamer] free-email: http://www.MailAndNews.com free-usenet: http://www.mailAndNews.com ; all the above is real REBOL code, believe it or not.