Axis new

From Catglobe Wiki
Revision as of 09:46, 7 March 2011 by 127.0.0.1 (talk | contribs) (jrfconvert import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Axis_new

This function is the Axis object's constructor and will return an array which must have 7 elements, configured like specified below:

  • OBJECT_TYPE: Object type information. It must have the same value as TYPE_AXIS constant.
  • AXIS_NAME: The name of the axis, it is the value of the argument name passed to the constructor function.
  • AXIS_TEXT: The text for the axis. It has "" as its value when first created.
  • AXIS_MATH_BASE: The math base for the axis. It has "" as its value when first created.
  • AXIS_PCT_BASE: The percentage base for the axis. It has "" as its value when first created.
  • AXIS_WEIGHT: The weight flag specifying whether the axis can be used as a weight or not. It has false as its value when first created.
  • AXIS_OPTIONS: The array of axis options, it is initialized as an array with no elements.

Syntax

Axis_new(name)

Arguments

name: Is a string expression. It is the name of the axis.

Return type

array

Examples

array axis = Axis_new("Age groups");

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

Availability

Version 5.5