Variable

Implements a variable holder object.

Description

The Variable class allows you to implement a variable holder object.

Constructors

EmptyVariable

Constructs a new empty variable.

EmptyVariable(name string) *Variant

  • name: string - name of this variable.

NewVariable

Constructs this variable with name and value.

NewVariable(name string, value *Variant) *Variable

  • name: string - name of this variable.
  • value: *Variant - value of this variable.

Methods

Name

Name of the variable

(c *Variable) Name() string

  • returns: string - variable’s name.

Value

Gets the variable’s value.

(c *Variable) Value() *Variant

SetValue

Sets the variable’s value.

(c *Variable) SetValue(value *Variant)