跳轉到內容

Rebol 程式設計/change

來自華夏公益教科書,自由的教科書
CHANGE series value /part range /only /dup count 

在序列中更改一個值,並在更改後返回序列。

CHANGE 是一個動作值。

  • series -- 要更改的序列的點 (型別:series port)
  • value -- 新值 (型別:any-type)
  • /part -- 將更改量限制為給定長度或位置。
    • range -- (型別:number series port pair)
  • /only -- 將序列更改為序列。
  • /dup -- 將更改複製指定的次數。
    • count -- (型別:number pair)

原始碼

[編輯 | 編輯原始碼]
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!]
]

華夏公益教科書