Type:
read: promptString -> object
Call syntax:
read(prompt)
Description:
read
displays the prompt string prompt
and waits for the user to type in a SALIERI
expression.
The input is terminated by hitting the Enter-key.
The user input is then evaluated as a SALIERI expression
and the resulting value of this
is returned as the result of read.
For reading in strings, the function readStr
should be used.
Attention!
The automatic evaluation of expressions entered using
read can cause objects in the current
workspace to be modified or deleted.
Error conditions:
Error conditions arise, when the input string is no valid SALIERI
expression or contains undefined identifiers.
Example:
> read("->")
->
Result= 12
> read("->")
->
Result= 18
> read("->")
->
Result= "hallo"
> read("->")
->
parse error
(occured while executing function "read")
> a := read("->")
->
Unknown identifier: notDefined
(occured while executing function "read")
> write(a)
Unknown identifier: a
(occured while executing function "write")
See also: readStr