More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{HelpFiles}} | {{HelpFiles}} | ||
==== Axis_optionExists ==== | ==== Axis_optionExists ==== | ||
Returns true if the given axis contains axis options matching the name passed as argument to the method and false otherwise. | Returns true if the given axis contains axis options matching the name passed as argument to the method and false otherwise. | ||
Line 21: | Line 21: | ||
'''Examples''' | '''Examples''' | ||
''array axis = Axis_new("Age groups");'' | ''array axis = Axis_new("Age groups");'' | ||
''axis[AXIS_TEXT] = "Choose an age group"; '' | ''axis[AXIS_TEXT] = "Choose an age group"; '' | ||
''axis[AXIS_MATH_BASE] = "Age"; '' | ''axis[AXIS_MATH_BASE] = "Age"; '' | ||
''axis[AXIS_PCT_BASE] = "Age != empty";'' | ''axis[AXIS_PCT_BASE] = "Age != empty";'' | ||
''bool b = Axis_optionExists(axis, "Under 18");'' | ''bool b = Axis_optionExists(axis, "Under 18");'' | ||
''if (b) print("Axis option \"Under 18\" exists");'' | ''if (b) print("Axis option \"Under 18\" exists.");'' | ||
''else print("Axis option \"Under 18\" does not | ''else print("Axis option \"Under 18\" does not exist.");'' | ||
''//Result: Axis option "Under 18" does not | ''//Result: Axis option "Under 18" does not exist.'' | ||
'''Availability''' | '''Availability''' |
Latest revision as of 08:05, 23 December 2011
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