Specifications
ProfileInt
726 InfoMaker
Return value
Integer. Returns default if filename is not found, section is not found in
filename, key is not found in section, or the value of key is not an integer.
Returns –1 if an error occurs.
Usage Use ProfileInt and ProfileString to get configuration settings from a profile file
you have designed for your application.
ProfileInt and ProfileString can read files
with ANSI or UTF16-LE encoding.
Examples This example uses the following PROFILE.INI file:
[MyApp]
Maximized=1
[Security]
Class = 7
This expression tries to return the integer value of the keyword Minimized in
section MyApp of file C:\PROFILE.INI. It returns 3 if there is no MyApp
section or no Minimized keyword in the MyApp section. Based on the sample
file above, it returns 3:
ProfileInt("C:\PROFILE.INI", "MyApp", "minimized", 3)
See also
ProfileString
key A string specifying the setting name in section whose value you
want. The setting name is followed by an equal sign in the file. Do
not include the equal sign in key. Key is not case sensitive.
default An integer value that
ProfileInt returns if filename is not found, if
section or key does not exist in filename, or if the value of key
cannot be converted to an integer.
Argument Description