basicvalue Type
The xreflect module exports a type xreflect~basicvalue which provides a way to manage values regardless of types. A basicvalue contains a single boolean, integer, real or string value. The type of value can be queried directly gettype function and you can access the value directly using getboolvalue, getintvalue, getrealvalue or getstringvalue.
A new basicvalue can be created from a boolean, integer, real, string or text using the constructor, e.g.:
bvtrue := basicvalue(true) bvzero := basicvalue(0) bvpi := basicvalue(3.14) bvname := basicvalue('my name')
An uninitialized basicvalue will contain the boolean value false.