integer function fdds_sscanf(str, fmt, ...)
fmt and optional arguments control the processing of definition values. The rules correspond to the scanf function in the ANSI C standard.
Format strings MUST be terminated with a null character ('\0').
The following table summarizes conversion specifiers recognized within fmt, but see the "C" manual for more detail.
fmt modifiers
char Data type h l L * I/O type
---- --------- -------------------------------- --------------------
u integer short long longlong suppress unsigned
d integer short long longlong suppress decimal
o integer short long longlong suppress octal
x integer short long longlong suppress hexadecimal
i integer short long longlong suppress dec,oct,hex
n integer short long longlong suppress (returns # characters)
c characters NA NA NA suppress (reads spaces also)
s string NA NA NA suppress (skips initial spaces)
p pointer NA NA NA suppress
e, f, g real NA double longdouble suppress
[...] character NA NA NA suppress
[^...] character NA NA NA suppress
% NA NA NA NA NA (literal "%")
fdds_sscanf pads trailing blanks or truncates strings as needed
during '%c', '%s' and '%[...]' conversion.
Unlike "C", the maximum field width is not required to prevent string overflow.
! default "alpha" to 3.14, override if defined
n = 0
beta = ' '
alpha = 3.14
ier = fdds_sscanf(card, '%f %s %d\0', alpha, beta, n)
fdds_scanf Scanf DDS dictionary definitions