[REBOL] Re: I hate computers!
From: edanaii:cox at: 6-Jan-2003 8:00
Ladislav Mecir wrote:
>Hi Ed,
>
>you wrote:
>
>>As was pointed out to me earlier, the use of Any-Type! seems to make a
>>parameter optional. Were I to define a parameter as such: Parameter [
>>String! Money! ], if I omit the parameter when called, it blows up. But
>>with any-type!, it doesn't. So this was a means to have multiple
>>parameters and have it optional. This would allow me to do some
>>overloading, i.e. fall Foo with a String performs a different action
>>than Foo with Money or Foo without a parameter.
>>
>>
>
>you can use this:
>
> f: func [parameter [string! money! unset!] [
> ...
> ]
>
>to have an optional parameter.
>
Ah hah! That's another thing I didn't know I could do.
Never thought of Unset as a datatype.
At this rate, I should get this language figured out in about 50 years. :)
--
Sincerely, | Control is an illusion, you infantile egomaniac!
Ed Dana | Nobody knows what's gonna happen next: not on a
Software Developer | freeway, not in an airplane, not inside our own
1Ghz Athlon Amiga | bodies and certainly not on a racetrack with 40
| other infantile egomaniacs!
| -- Nicole Kidman, Days of Thunder