modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / etc / calc / help / fscan
blob303fe093dee6876b65f821668c8b841e9ebb7f84
1 NAME
2    fscan - scan a file for possible assignment to variables
4 SYNOPSIS
5    fscan(fs, x_1, x_2, ..., x_n)
7 TYPES
8     fs                  file stream open for reading
9     x_1, x_2, ...       any
11     return              integer
13 DESCRIPTION
14    Starting at the current position on fs and while values remain in the
15    x_i arguments, fields of non-whitespace characters are read and evaluated
16    in succession and if the corresponding x_i is an lvalue, the value of
17    the field is assigned to x_i.  Scanning ceases when no x_i remain or
18    when the stream reaches end-of-file.
20    The function returns the number of fields evaluated.
22 EXAMPLE
23     ; global a, b, c, d;
24     ; f = fopen("/tmp/junk", "w+");
25     ; fputs(f, "\t3+4\t\ta-2i  d=a^2   'word'")
26     ; rewind(f)
27     ; fscan(f, a, b, , c)
28         4
29     ; print a, b, c, d
30     7 a-2i word 49
32 LIMITS
33     The number of arguments is not to exceed 1024.
35 LINK LIBRARY
36     none
38 SEE ALSO
39     scan, strscan, fscanf, scanf, strscanf, printf, fprintf, strprintf
41 ## Copyright (C) 1999-2006  Landon Curt Noll
43 ## Calc is open software; you can redistribute it and/or modify it under
44 ## the terms of the version 2.1 of the GNU Lesser General Public License
45 ## as published by the Free Software Foundation.
47 ## Calc is distributed in the hope that it will be useful, but WITHOUT
48 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
49 ## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
50 ## Public License for more details.
52 ## A copy of version 2.1 of the GNU Lesser General Public License is
53 ## distributed with calc under the filename COPYING-LGPL.  You should have
54 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
55 ## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
57 ## @(#) $Revision: 30.1 $
58 ## @(#) $Id: fscan,v 30.1 2007/03/16 11:10:42 chongo Exp $
59 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscan,v $
61 ## Under source code control:   1996/04/30 03:05:18
62 ## File existed as early as:    1996
64 ## chongo <was here> /\oo/\     http://www.isthe.com/chongo/
65 ## Share and enjoy!  :-)        http://www.isthe.com/chongo/tech/comp/calc/