User Tools

Site Tools


tryfetch_get_a_value_from_the_ini_file_.htm
Navigation:  ABC Library Reference > INIClass > INIClass Methods >====== TryFetch (get a value from the INI file) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TryFetch( section, entry )

blk2blue.jpg

TryFetch Returns a value from the INI file.
section A string constant, variable, EQUATE, or expression containing the INI file section name.
entry A string constant, variable, EQUATE, or expression containing the INI file entry name.

The TryFetch method returns a value from the INI file. If the specified section and entry do not exist, TryFetch returns an empty string. This allows you to check the return value and take appropriate action when the INI file entry is missing.

Return Data Type:     STRING

Example:

Color     BYTE

DefaultColor EQUATE(5)

CODE

Color=INIMgr.TryFetch('Preferences','Color')     !return 'Color', no default

IF NOT Color

 Color=DefaultColor

END

See Also:     GETINI

tryfetch_get_a_value_from_the_ini_file_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1