input

print prompt and get user input


Parameters

input prompt :string

Attributes

replget input as if in a REPL
history:stringset path for saving history
complete:blockuse given array for auto-completions
hint:dictionaryuse given dictionary for typing hints

Returns

  • :string

Examples

copy
name: input "What is your name? " ; (user enters his name: Bob) print ["Hello" name "!"] ; Hello Bob!

copy
; creating a simple REPL while [true][ inp: input.repl .history: "myhistory.txt" .complete:["Hello there", "Hello world!"] .hint:#[he: "perhaps you want to say hello?"] "## " print ["got:" inp] ] ; will show a REPL-like interface, with arrow navigation enabled ; show previous entries with arrow-up, store entries in ; a recoverable file and also use autocompletions and hints ; based on give reference

Related