User Tools

Site Tools


fetchfield_return_comma_delimited_ini_file_value_.htm
Navigation:  ABC Library Reference > INIClass > INIClass Methods >====== FetchField (return comma delimited INI file value) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

FetchField( section, entry, field )

blk2blue.jpg

FetchField Returns a comma delimited 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.
field An integer constant, variable, EQUATE, or expression identifying the comma delimited value to return.

The FetchField method returns one of several comma delimited values from the INI file. FetchField assumes the value for the entry is one of several comma delimited values of the form V1,V2,…,Vn. For example:

[MySection]

MyEntry=M,35,Blue,Brown,160

A field value of one (1) returns the value prior to the first comma in the string; a value of two (2) returns the value between the first and second commas; a three (3) returns the value between the second and third commas, etc.

Return Data Type:     STRING

Example:

Sound    STRING('ON ')

Volume   BYTE(3)

 CODE

INIMgr.Update('Preferences','Sound&Volume',|   !create INI entry like

       CLIP(Sound)&','&Volume)                 !Sound&Volume=ON,3

!program code

Sound=INIMgr.FetchField('Preferences','Sound&Volume',1)  !get 1st value - 'ON'

Volume=INIMgr.FetchField('Preferences','Sound&Volume',2) !get 2nd value ' 3

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