company logo

opai :: ResolveSymName - Symbolic name (sym_name)

A symbolic file or database or ini-file reference is a string, which will be resolved to a file name in following steps:

  • Resolve option variables in string
  • When the passed string contains option names names (enclosed in %...%), those are resolved first.

  • When string is a file location (existing file), it will be returned as file path.
  • Locate string as option variable
  • When being found, the value of the option variable is assigned and processing starts from beginning. Locating an option variable includes option variables defined before any section and those defined in the application section.

  • Locate string in section [FILE-CATALOG]

When string is defined as option variable in the section its value is assigned to string and processing starts from beginning.

  • Locate string in section [DATABASE]
  • When string is defined as option variable in the section its value is assigned to string and processing starts from beginning.

  • When not being resolved as an existing file name, an error will be returned.

In case of errors, the last string value is returned in order to allow creating a file not yet existing.

In documentation, symbolic names are, usually referred to as sym_name.

Return value:  Success ( logical  )

Implementation details