Toggle menu
875
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Axis optionExists

From Catglobe Wiki



Axis_optionExists

Returns true if the given axis contains axis options matching the name passed as argument to the method and false otherwise.

Syntax

Axis_optionExists(axis, optionName)

Arguments

axis: Is an axis array, created by Axis_new function.

optionName: Is a string expression, which is name of the option to look up.

Return type

bool

Examples

array axis = Axis_new("Age groups");

axis[AXIS_TEXT] = "Choose an age group";

axis[AXIS_MATH_BASE] = "Age";

axis[AXIS_PCT_BASE] = "Age != empty";

bool b = Axis_optionExists(axis, "Under 18");

if (b) print("Axis option \"Under 18\" exists.");

else print("Axis option \"Under 18\" does not exist.");

//Result: Axis option "Under 18" does not exist.

Availability

Version 5.5