RvG Clipper Collection - RProfile

** Shareware Libraries for
CA-Clipper !
RProfile
Use MS-Windows like .INI files in your CA-Clipper applications
!
RProfile is donated to the Public Domain by Rolf van Gelder
The CA-Clipper program file RProfile.prg contains functions to
manipulate MS-Windows like .INI files.
The .PRG file is written for use with CA-Clipper 5.x.
R_IniWrite() : Create or update an .INI file
- Syntax:
- R_IniWrite ( cSection, cEntry, cString, cFName )
-
- Description:
- This function writes an entry to an .INI file. If the .INI
file doesn't exist it will be created.
If the section doesn't exist it will be created.
- Arguments:
-
- cSection
- String that specifies the section to which the string will
be copied.
If the section does not exist, it is created.
cSection is case-independent.
- cEntry
- String containing the entry to be associated with the
string.
If the entry does not exist in the specified section, it is created.
If the parameter is NIL, the entire section, including all entries within the section, is
deleted.
- cString
- String to be written to the file.
If this parameter is NIL, the entry specified by the cEntry parameter is deleted.
- cFName
- String that names the initialization file.
If the file doesn't exist it will be created.
- Returns:
- .T. = Success, .F. = Error detected
|
R_IniRead() : Read entries from an .INI file
- Syntax:
- R_IniRead ( cSection, cEntry, cDefault, cFName, lAppend )
- Description:
- This function searches the file for an entry that matches
the name specified by the cEntry parameter under the section heading specified by
the cSection parameter.
If the entry is found, it corresponding string is returned.
If the entry does not exist, the default string specified by the cDefault parameter
is copied.
If, in that case, the lAppend flag is .T. the default entry will be added to the
file.
- Arguments:
-
- cSection
- String that specifies the section containing the entry.
- cEntry
- String containing the entry whose associated string is to be
retrieved.
If this value is NIL, all entries in the section specified by the cSection
parameter are copied to an array.
- cDefault
- String that specifies the default value for the given entry
if the entry cannot be found in the initialization file.
- cFName
- String that names the initialization file.
- lAppend
- Boolean that specifies if the entry (with the associated
default value) should be added to the .INI file if the entry cannot be found.
If the section does not exist it will be created.
- Returns:
- nil : Error detected
-or-
cString : Entry as found in the .INI file
-or-
aEntries : Array containing all entries in a section
|
To create a stand-alone test program
compile with :
CLIPPER RProfile /n/dTEST
To create a linkable object file compile with :
CLIPPER RProfile /n
Get your free copy of RProfile.prg:
RProfile.zip - RProfile.prg: MS-Windows like .INI file
functions (4 K)
© 1993-2001 Rolf van Gelder, Eindhoven - <RvGCC@hotmail.com>
Number of visitors of this page since 1
August 1995: