DDS Developers Documentation → Fortran API → scant


Index
fdds_addaxis
fdds_align
fdds_axis_prod
fdds_binfd
fdds_calloc
fdds_calloc8
fdds_check
fdds_close
fdds_closepr
fdds_closepr2
fdds_copy
fdds_count
fdds_datadefn
fdds_dict
fdds_errors
fdds_fflush
fdds_free
fdds_genus
fdds_get
fdds_history
fdds_in
fdds_index
fdds_info
fdds_initmpi
fdds_initmpix
fdds_initopenmp
fdds_isreg
fdds_key
fdds_lseek
fdds_lseek8
fdds_malloc
fdds_malloc8
fdds_map
fdds_member
fdds_memuse
fdds_mod
fdds_name
fdds_newer
fdds_next
fdds_object
fdds_offset
fdds_open
fdds_openm
fdds_openpr
fdds_out
fdds_parent
fdds_prec
fdds_prev
fdds_prime
fdds_printf
fdds_printt
fdds_printv
fdds_prtcon
fdds_prterr
fdds_prthdr
fdds_prtmsg
fdds_ptr
fdds_put
fdds_read
fdds_readm
fdds_realloc
fdds_realloc8
fdds_rmaxis
fdds_savepr
fdds_scale
fdds_scanf
fdds_scank
fdds_scant
fdds_scantn
fdds_scanv
fdds_sprintf
fdds_sscanf
fdds_switch
fdds_write
fdds_writem

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)
For additional help, open an issue here