[REBOL] Re: REBOL Assign command.
From: edanaii:cox at: 28-Dec-2002 13:00
Excellent! Thank you Bohdan!
Here's the updated version:
==========
REBOL []
Assign: Func [ "Creates an Amiga-like Assign command."
Volume [ Word!] "The function that this
command will create."
Path [ String! File! ] "The directory path that will
be assigned to it"
] [
Do Trim Rejoin [ Volume {: Func [ FilePath [ Any-Type! ] ] [
Return Either (Value? 'FilePath) [
to-file Join %} Path { FilePath ] [
%"} Path {" ]
] }
]
]
==========
Much more useful now. :)
Bohdan or Rosemary Lechnowsky wrote:
> Ed,
>
> You can specify optional parameters. But it can cause confusion
> inside a script unless you specify the bounds of the evaluation (like
> inside a block).
>
> >> rebsource: func [dir [any-type!]][if value? 'dir [print dir]]
> >> rebsource
> == none
> >> rebsource "."
> .
> >>
>
> Have fun!
>
--
Sincerely, | The problems of two little people don't amount to
Ed Dana | a hill of beans in this crazy mixed-up world! But
Software Developer | this is OUR hill, and these are OUR beans!
1Ghz Athlon Amiga | -- Naked Gun via Casablanca.