REBOL Programming/set

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

SET word value /any /pad 

DESCRIPTION:[edit]

Sets a word, block of words, or object to specified value(s).

SET is a native value.

ARGUMENTS[edit]

  • word -- Word or words to set (Type: any-word block object)
  • value -- Value or block of values (Type: any-type)

REFINEMENTS[edit]

  • /any -- Allows setting words to any value.
  • /pad -- For objects, if block is too short, remaining words are set to NONE.

SOURCE CODE[edit]

set: native[
    {Sets a word, block of words, or object to specified value(s).} 
    word [any-word! block! object!] "Word or words to set" 
    value [any-type!] "Value or block of values" 
    /any "Allows setting words to any value." 
    /pad {For objects, if block is too short, remaining words are set to NONE.}
]