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

Axis optionExists: Difference between revisions

From Catglobe Wiki
jrfconvert import
 
Cg van (talk | contribs)
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:HelpBooks]]
 {{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.  


'''Syntax'''
'''Syntax'''  


Axis_optionExists(''axis'', ''optionName'')
Axis_optionExists(''axis'', ''optionName'')  


'''Arguments'''
'''Arguments'''  


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


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


'''Return type'''
'''Return type'''  


bool
bool  


'''Examples'''
'''Examples'''  


''bool b = Axis_optionExists(ageGroupAxis, "Adult");''
''array axis = Axis_new("Age groups");''  


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


Version 5.5
''axis[AXIS_MATH_BASE] = "Age"; ''
__NOTOC__
 
<!-- imported from file: 5232.htm-->
''axis[AXIS_PCT_BASE] = "Age&nbsp;!= 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 __NOTOC__ <!-- imported from file: 5232.htm-->  
 
[[Category:Axis_set_modifying_CGScript_functions]]

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