跳至內容

Rebol 程式設計/do

來自華夏公益教科書,開放的書本,開放的世界
DO value /args arg /next 

評估一個塊、檔案、URL、函式、詞或任何其他值。

DO 是一個原生值。

  • value -- 通常是檔名、URL 或塊(型別:任何)
  • /args -- 如果 value 是一個指令碼,這將設定其 system/script/args
    • arg -- 傳遞給指令碼的引數。通常是一個字串。(型別:任何)
  • /next -- 只執行下一個表示式。返回包含結果和新位置的塊。

原始碼

[編輯 | 編輯原始碼]
do: native[
    {Evaluates a block, file, URL, function, word, or any other value.} 
    value "Normally a file name, URL, or block" 
    /args {If value is a script, this will set its system/script/args} 
    arg "Args passed to a script. Normally a string." 
    /next {Do next expression only.  Return block with result and new position.}
]

華夏公益教科書