The template for the function call would be:

f/ref1/ref2 <a> <arg1> <arg2>

So, try:

>> f: func [ a /ref1 arg1 /ref2 arg2] [ either ref2 [ print "ref2" ] [
print "no ref2" ] ]
>> f/ref1/ref2 3 4 1
ref2

- Michael Jelinek





[EMAIL PROTECTED] on 08/28/2000 09:43:06 AM

From: [EMAIL PROTECTED] on 08/28/2000 09:43 AM

Please respond to [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
cc:
Subject:  [REBOL] what if a function requires multiple argument-based
      refinements?


This is a bit of an abstract question by a person who is 1/3rd of the way
through the McGraw text, but I just keep popping with questions.

What if I had the following:

>> f: func [ a /ref1 arg1 /ref2 arg2] [ either ref2 [ print "ref2" ] [
print "no ref2" ] ]
>> f/ref1 3 /ref2 4 1
no ref2
== 1
>>

how could I call the function "f" to make use of both refinements?



Get your FREE Email and Voicemail at Lycos Communications at
http://comm.lycos.com









Reply via email to