Ini_GetBoolean

int Ini_GetBoolean (IniText handle, const char sectionName[], const char tagName[], int *booleanValue);

Purpose

Obtains the boolean value associated with tagName in the section identified by sectionName.

Parameters

Input
Name Type Description
handle IniText A handle returned from Ini_New. It represents the list of in-memory tag/value pairs.
sectionName const char [] The section name under which to find the tag/value pair.
tagName const char [] The tag name in the tag/value pair.
Output
Name Type Description
booleanValue integer * The variable into which the boolean value associated with tagName is placed. If the boolean value is "True", a 1 is placed in the variable. If the boolean value is "False", a 0 is placed in the variable.

If tagName cannot be found, or the value is not a valid boolean representation, or an error occurs, the variable is left untouched.

Return Value

Name Type Description
status integer Indicates whether a valid tag/boolean pair was found with the specified Tag Name in the section specified by Section Name.

A positive return value indicates that a tag/boolean pair was found, and that the boolean portion of the pair was one of the valid boolean representations.

A zero indicates that no tag/boolean pair was found, or that the boolean portion was empty.

A negative value indicates an error. If the value is from –1 to –999, it is one of the error values defined in userint.h. If the value is from –5000 to –5999, it is one of the error values defined in toolbox.h.

For this function, the only errors you might encounter are:
–12 Out of memory!
–5024 Invalid boolean