integer function fdds_scanf(alias, fmt,...)
"fmt" is an ANSI C standard format string for the stdio scanf function. It converts optional arguments "..." following the rules of the ANSI C standard for scanf.
Format strings MUST be terminated with a null character ("\0").
Optional arguments, "...", are program variables that are set by fdds_scanf if they are present in the "scan" dictionaries.
Dictionaries may contain alias: definitions. They define alternate names for "older" definitions. alias: definitions are denoted by a special prefix, "alias:defn_name" or "$defn_name". The value of an alias: definition is a list of alternate names.
The following table summarizes conversion specifiers recognized within fmt.
fmt -------- Sun -------- char Fortran modifier h l L d integer *2 *4 *4 i integer *2 *4 *4 o integer *2 *4 *4 u integer *2 *4 *4 x integer *2 *4 *4 c character NA NA NA s character NA NA NA f real NA dp NA e, f, g real NA dp NA p not char NA NA NA n integer *2 *4 *4 [...] character NA NA NA [^...] character NA NA NA % NA NA NA NAfdds_scanf 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.
c default "alpha" to 3.14, override if defined alpha = 3.14 ier = fdds_scanf('alpha', '%f\0', alpha) c retrieve beta, using defn alias ier = fdds_scanf('beta BETA Beta', '%s\0', beta) c retrieve mixed data types (string, integer, float) ier = fdds_scanf('gamma', '%s %d %f\0', s, i, r) c retrieve 1st & 2nd axis sizes ier = fdds_scanf('size.axis(1)', '%d\0', nsmp) ier = fdds_scanf('size.axis(2)', '%d\0', ntrc) c retrieve arbitrary number of float values ier = fdds_scanf('omega', '%f\0',omega(1)) n = 0 dowhile(ier.eq.1) n = n + 1 ier = fdds_scanf(' ', '%f\0', omega(n+1)) enddo c retrieve alias definition itself ier = fdds_scanf('$name', ' %s\0', alias)
fdds_dict Select DDS dictionary and set mode fddx_dict Select DDS dictionary and set mode fdds_scank Retrieve a definition