fdds_scantn - retrieve definition from DDS dictionary


SYNOPSIS

#include <fdds.h> (fixed-format sources)
#include <f90dds.h> (free-format sources)

integer function fdds_scantn(alias, str, count)

character*(*) alias
character*(*) str
integer count

DESCRIPTION

fdds_scantn retrieves a definition from a dictionary. The "scan" dictionary(s) must have been previously selected by fdds_dict, or related function. The name of the definition is specified by alias.

A new definition may be selected for retrieval. Multiple names, delimited by white space, may be specified by alias. If a name is specified, the "scan" dictionaries are searched. Dictionaries are scanned from bottom-to-top and right-to-left. The newest definition that matches any alias is selected. The function returns EOF, if no match is found.

The current "scan" definition is accessed, if a blank alias is specified. The value is processed, starting from the current position. The function returns EOF, if a "scan" definition is not already selected.

fdds_scantn differs from fdds_scant in that a count is specified to determine which token in the definition is to be returned (count=1 for first token). The function returns the number of characters in the string. If a token is not found or count is out of range, it returns EOF and str is not changed.

If alias is blank, then the count is relative to the previous scan position for the current "scan" definition.

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.

EXAMPLES

!     retrieve third token from any of "bar", "Bar" or "BAR"
      ier = fdds_scantn('bar Bar BAR', bar, 3)
    

SEE ALSO

fdds_dict Select DDS dictionary and mode
fdds_scank Retrieve a definition
fdds_scanf Retrieve a definition
fdds_scant Retrieve a definition
fdds_scanv Retrieve a definition
    

AUTHOR

R. L. Selzler, EPTG (May, 1994)