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

[REBOL] Re: RAMBO #3652 unset?

From: lmecir::mbox::vol::cz at: 22-Mar-2005 15:05

Hi Arie,
>Hi Gabriele, > >thanks for your explanation in RAMBO. > >Still I have a few remarks / questions. > >#1. it seems very odd to me that unset and unset? are in fact unrelated! > Unset causes a variable to have it's value removed. > Unset? checks for datatype unset! >
you are right: unset? is related to unset! exactly like integer? relates to integer! etc.
>#2. Is () the only "thing" with datatype unset! ? > If not, what other "things" have this value ? > Could you give one or more practical examples of the use of >unset! and unset? ? >
check the following expressions: do [] print "" prin "" do does [exit] forever [break] get/any 'uninitialized-variable A "practical example" - a function accepting an optional integer argument: f: func [argument [integer! unset!]] [ print ["Argument:" either value? 'argument [argument] ["not supplied"]] ] f 12 f -Ladislav