S_SCANF
Syntax
int_val = S_SCANF ( s, format, var1[, var2, var3, ...] );
- Input arguments
-
string s String to be scanned to get values for variables. string format Format of the target variables.
- Output arguments
-
untyped var1[, var2, var3, …] Target variables.
Return Values
- Success:
-
int nr_items Number of successfully read items (variable values).
- Failure:
-
int -1 Script interface error.
Description
This function scans string 's' to get values for variables var1, var2 … according to the given format string. The format is similar to the C-language printf format. This is not a full implementation of C-language sscanf(). For example, the format cannot parse exponential notations (3.14E-23). Valid input fields in the format string are: %d, %x, %f, and %s. In hexadecimal notation (%x), the conversion uses numbers (0123456789) and letters (abcdef or ABCDEF).