ReadINI 

                   (System Library)

Description:              This subroutine reads a variable entry from an .INI file or a buffer containing one and returns its value.

Returns:                    Varies

Usage:                       Script

Format:                      \System\ReadINI(File, Section, VarName [, UseBuff])

Parameters:             File    { varies (text or buffer) }  { required }  { no default: }

                                      Any text expression giving the full path and file name of the .INI file or the actual buffer containing its contents, depending on the UseBuff parameter.

                                    Section   { text }  { required }  { no default: }

                                      Any text expression giving the name of the section in the file; this should not include the square brackets delimiting the section.

                                    VarName   { text }  { required }  { no default: }

                                      Any text expression giving the name of the variable for which the value is required.

                                    UseBuff   { Boolean }  { optional }  { default: FALSE }

                                      An optional parameter that is any logical expression; if true (non-0) the value of File must be a buffer, if false (0) it is a file that is to be used. The default used if this parameter is omitted is false.

Comments:               This subroutine is a member of the System Library, and must therefore be prefaced by \System\, as shown in the "Format" section. If the application you are developing is a script application, the System variable must be declared in APPMOD.SRC and need not be prefaced by a backslash in the function call.

                             The return value will be invalid if the .INI file, section or variable was not found. Searches performed by this function are case insensitive.

Example:

If 1 Main;

[

  DSource = System\ReadINI("Config.INI" { Name of file }, 

                           "System" { Name of section }, 

                           "AnswerCalls" { Name of variable }, 

                           0 { Read file format }); 

]

This assigns the value of the variable AnswerCalls in the System section of the Config.INI file to the variable called DSource.

See Also:

CheckFileExist | CheckPathExist  | ReadSectINI  | WriteINI | WriteSectINI |