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.
- 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.
- returns: *Variant - variable value.
SetValue
Sets the variable’s value.
- value: *Variant - variable’s value.