Initial revision
[LeanCalc.git] / help / prompt
1 NAME
2     prompt - display a prompt and wait for input from terminal
3
4 SYNOPSIS
5     prompt(str)
6
7 TYPES
8     str         string
9
10     return      string
11
12 DESCRIPTION
13    When prompt(str) is called and input is from a terminal, the string
14    str is displayed and execution is halted until a newline ends a line
15    read from the input; the string formed by the characters in the line
16    (other than the newline) is returned as the value of prompt().
17
18 EXAMPLE
19     > x = prompt("? ");
20     ? 273
21     > x
22         "273"
23
24     > for (;;) {s = prompt("? "); if (s=="end") break; print "\t":eval(s)^2;}
25     ? 3
26             9
27     ? 2 + 3
28             25
29     ? end
30     >
31
32 LIMITS
33     none
34
35 LINK LIBRARY
36     none
37
38 SEE ALSO
39     XXX - fill in
40