Axis removeOption
Axis_removeOption
Removes an axis option with the option index passed as argument to the method. If the option index is smaller than 0 or larger than the number of axis options minus one then return false and nothing is removed. Else it will remove the axis option positioned at the option index passed as argument to the method and return true.
When using string name it is slightly different. Then returns true if anything was removed and false otherwise.
Syntax
Axis_removeOption(axis, optionIndex)
or
Axis_removeOption(axis, name)
Arguments
axis: Is an axis array, created by Axis_new function.
optionIndex: Is a number expression. It is the index of the axis option in the option list, returned by Axis_addOption function.
name: Is a string expression. It is the name of the axis option.
Return type
bool
Examples
array axis = AxisSet_getAxis("Sex");
print(axis[AXIS_OPTIONS]);
//Result: {{1,Mand,Sex == [1],},{1,Kvinde,Sex == [2],}}
Axis_removeOption(axis, 0);
print(axis[AXIS_OPTIONS]);
//Result: {{1,Kvinde,Sex == [2],}}
Availability
Version 5.5