Difference between revisions of "INI SET()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to set the value of a key in a specified section of an 'ini' file | Function to set the value of a key in a specified section of an 'ini' file | ||
− | |||
==Syntax== | ==Syntax== | ||
INI_SET(<expC1>, <expC2>, <expC3>, <expC4>) | INI_SET(<expC1>, <expC2>, <expC3>, <expC4>) | ||
− | |||
==See Also== | ==See Also== | ||
[[INI_GET()]], [[INI_GETSECTION()]], [[INI_SETSECTION()]] | [[INI_GET()]], [[INI_GETSECTION()]], [[INI_SETSECTION()]] | ||
− | |||
==Description== | ==Description== | ||
The INI_SET() function sets the value of an individual key in a specified section of an 'ini' file. The function returns .T. (true) if the value is set successfully, .F. (false) if not. | The INI_SET() function sets the value of an individual key in a specified section of an 'ini' file. The function returns .T. (true) if the value is set successfully, .F. (false) if not. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | |
!Parameter||Description | !Parameter||Description | ||
|- | |- | ||
Line 26: | Line 22: | ||
|<expC4>||Name of the ini file. | |<expC4>||Name of the ini file. | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 46: | Line 41: | ||
ini_set('global','key1','new value','test.ini') | ini_set('global','key1','new value','test.ini') | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:ASCII File Access Functions]] |
− | + | ||
[[Category:Lianja VFP Extensions]] | [[Category:Lianja VFP Extensions]] | ||
[[Category:VFP Function Extensions]] | [[Category:VFP Function Extensions]] |
Latest revision as of 08:18, 4 February 2013
Contents
Purpose
Function to set the value of a key in a specified section of an 'ini' file
Syntax
INI_SET(<expC1>, <expC2>, <expC3>, <expC4>)
See Also
INI_GET(), INI_GETSECTION(), INI_SETSECTION()
Description
The INI_SET() function sets the value of an individual key in a specified section of an 'ini' file. The function returns .T. (true) if the value is set successfully, .F. (false) if not.
Parameter | Description |
---|---|
<expC1> | Name of the section. |
<expC2> | Name of the key. |
<expC3> | Value to be set. |
<expC4> | Name of the ini file. |
Example
# test.ini # comment lines are preceeded by a '#' ; or a ';' # # "Sections" are enclosed in [ and ] [global] ; key/value pairs are contained in the sections and are written like this key1 = value key2 = value2 ; You can include macros in the key/value pairs. key3 = This is $(key2) and $(key1) # end of test.ini
ini_set('global','key1','new value','test.ini')