| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > INIClass > INIClass Methods >====== TryFetch (get a value from the INI file) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[init initialize the iniclass object .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[tryfetchfield return comma delimited ini file value .htm|{{btn_next_n.gif|Next page}}]] | | || **TryFetch( **//section, entry //**)** {{blk2blue.jpg|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 return ini file entry .htm|GETINI]]