[Contents] · [Home] · [Mail]

SALIERI Language - read

read: promptString -> object

Call syntax:

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.

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.

> read("->")
Result= 12
> read("->")
Result= 18
> read("->")
Result= "hallo"
> read("->")
Error in command-line:
parse error
(occured while executing function "read")
> a := read("->")
Error in command-line:
Unknown identifier: notDefined
(occured while executing function "read")
> write(a)
Error in command-line:
Unknown identifier: a
(occured while executing function "write")

See also: readStr

[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.