Initial revision
[LeanCalc.git] / help / scan
1 NAME
2    scan - scan standard input for possible assignment to variables
3
4 SYNOPSIS
5    scan(x_1, x_2, ..., x_n)
6
7 TYPES
8     x_1, x_2, ...       any
9
10     return              integer
11
12 DESCRIPTION
13    When input is from a terminal, execution is halted and input is read
14    until a newline is entered.  Strings of non-whitespace characters
15    are evaluated in succession and if the corresponding x_i is an lvalue,
16    the resulting value is assigned to x_i.  If the number of strings
17    read exceeds n, only the first n strings are evaluated.  If the number
18    of strings is less than n, the later x_i are ignored.
19
20 EXAMPLE
21     > global a, b, c, d;
22     > scan(a, 0, c, d)
23     > 2+3    b=a^2        3+4i     3+"a"
24     > print a,b,c,d
25         5 25 3+4i Error 3
26
27 LIMITS
28     none - XXX - is this correct?
29
30 LINK LIBRARY
31     none - XXX - is this correct?
32
33 SEE ALSO
34     fscan, strscan, fscanf, strscanf, scanf, printf, fprintf
35