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

[REBOL] Re: REBOL Assign command.

From: greggirwin:mindspring at: 28-Dec-2002 11:32

Hi Ed, ED> So, all that being said, is there a way to make parameters optional in ED> REBOL? So far, in my meager investigations, I have not found a way. I'd ED> like to complete the function so that it can be called like this: READ ED> REBSOURCE, no parameters. In addition to Bo's comment, you could build your function to take a refinement if that seems less cumbersome in your common use. Assign: Func [ "Creates an Amiga-like Assign command." Volume [ Word!] "The function that this commmand will create." Path [ String! File! ] "The path that will be assigned to it." ] [ Do Rejoin [ Volume ": Func [/with AssignPath] [to-file Join %" Path { either with [AssignPath][""] ] } ] ] Then you would use it like this: read REBSOURCE do REBSOURCE/with %hello.r -- Gregg