Siebel eScript Language Reference > Siebel eScript Commands > File I/O Methods in eScript >

Clib.sscanf() Method

This method reads input from the standard input device and stores the data in variables provided as parameters.


Clib.sscanf([formatString] [,var1, var2, ..., varn])



A string indicating how variable or literal parameters are to be treated

var1, var2, ..., varn

Variables in which to store the input


EOF if input failure occurs before any conversion occurs; otherwise, the number of variables assigned data.


This method reads input from the standard input stream (the keyboard unless some other file has been redirected as stdin by the Clib.freopen() function) and stores the data read in the variables provided as parameters following formatString. The data is stored according to the character combinations in formatString which indicate how the input data is to be read and stored.

This method is identical to calling fscanf() with stdin as the first parameter. It returns the number of input items assigned; this number may be fewer than the number of parameters requested if there is a matching failure. If there is a conversion failure, EOF is returned.

The formatString value specifies the admissible input sequences and how the input is to be converted to be assigned to the variable number of parameters passed to this function. The input is not read until the ENTER key is pressed.

Characters from input are matched against the characters of the formatString until a percent character (%) is reached. The percent 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:


For values for these items, see Formatting Input in eScript.

See Also

Clib.fscanf() Method
Clib.sinh() Method
Clib.asctime() Method

Siebel eScript Language Reference