REBOL Programming/change

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

USAGE:[edit]

CHANGE series value /part range /only /dup count 

DESCRIPTION:[edit]

Changes a value in a series and returns the series after the change.

CHANGE is an action value.

ARGUMENTS[edit]

  • series -- Series at point to change (Type: series port)
  • value -- The new value (Type: any-type)

REFINEMENTS[edit]

  • /part -- Limits the amount to change to a given length or position.
    • range -- (Type: number series port pair)
  • /only -- Changes a series as a series.
  • /dup -- Duplicates the change a specified number of times.
    • count -- (Type: number pair)

SOURCE CODE[edit]

change: native[
    {Changes a value in a series and returns the series after the change.} 
    series [series! port!] "Series at point to change" 
    value [any-type!] "The new value" 
    /part {Limits the amount to change to a given length or position.} 
    range [number! series! port! pair!] 
    /only "Changes a series as a series." 
    /dup "Duplicates the change a specified number of times." 
    count [number! pair!]
]

{{BookCat}}