Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object >
Clib.fscanf() Method
This function reads data from a specified file and stores the data items in a series of parameters.
Syntax
Clib.fscanf(filePointer, formatString, var1, var2, ..., varn)
Returns
The number of input items assigned. This number may be fewer than the number of parameters requested if there was a matching failure. If there is an input failure (before the conversion occurs), this function returns EOF.
Usage
This function reads input from the file indicated by filePointer and stores that input in the var1, var2, ..., varn parameters following the formatString value according to the character combinations in the format string, which indicate how the file data is to be read and stored. The file must be open, with read access.
Characters from input are matched against the formatting instruction characters of formatString until a percent character (%) is reached. The % character indicates that a value is to be read and stored to subsequent parameters following formatString. Each subsequent parameter after formatString gets the next parsed value taken from the next parameter in the list following formatString.
A parameter specification takes this form:
%[*][width]type
For values for these items, read Formatting Input.
See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |