Difference between revisions of "Axis optionExists"

From Catglobe Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Axis set modifying CGScript functions]]
+
 {{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 10: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