跳轉到內容

Rebol 程式設計/ask

來自華夏公益教科書
ASK question /hide 

向用戶詢問輸入。

ASK 是一個函式值。

  • question -- 提示使用者(型別:序列)
  • /hide -- 使用 * 掩蓋輸入

原始碼

[編輯 | 編輯原始碼]
ask: func [
    "Ask the user for input." 
    question [series!] "Prompt to user" 
    /hide "mask input with *"
][
    prin question 
    trim either hide [input/hide] [input]
]
華夏公益教科書