2 fscan - scan a file for possible assignment to variables
5 fscan(fs, x_1, x_2, ..., x_n)
8 fs file stream open for reading
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.
24 ; f = fopen("/tmp/junk", "w+");
25 ; fputs(f, "\t3+4\t\ta-2i d=a^2 'word'")
33 The number of arguments is not to exceed 1024.
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/