* Peter Wood <[EMAIL PROTECTED]> [060305 21:34]:
> 
> Jeff
> 
> Ladislav Mecir's excellent "essays" may help, particularly 
> http://en.wikibooks.org/wiki/REBOL_Programming/Advanced/Interpreter
> 
> You can access Ladislav's other work via 
> http://www.fm.vslib.cz/~ladislav/rebol/

  You can also use the rebol word 
    unset?
  which is a predicate that checks to see if a value
  is unset.

example:
>> unset? print "yes"
yes
== true

This is useful when using a loop to accumulate values. You can use to
first check to see something is unset before adding it to whatever you
are using to accumulate the values.

I generally use unset? inside of small functions, using it by itself,
has caused me some heartburn in the past.

example:
=s: func [
    "Check for unset or none values and return an empty string if found"
    v [any-type!]
    ][
    either unset? get/any 'v 
        [""]
        [any[v ""]]
] ;; end function
In the interpreter window, enter
>> help unset?
;; and
>> help get

-- 
Tim Johnson <[EMAIL PROTECTED]>
      http://www.alaska-internet-solutions.com
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to