DefaultUnit - ObjectVision/GeoDMS GitHub Wiki

Unit functions DefaultUnit

syntax

  • DefaultUnit(valuetype_name)

definition

DefaultUnit(valuetype_name) results in the default unit of the value type named by valuetype_name.

valuetype_name is a string parameter holding the name of the value type, not the value type itself: DefaultUnit('uint32') is the callable form, DefaultUnit(uint32) passes a unit and results in Cannot find operator for these arguments. An unknown name results in '...' is not recognized as a valid type indicator.

The operator earns its keep when the name is computed; for a value type that is known when the configuration is written, the value type itself already denotes its default unit.

example

unit<string> unit_str := DefaultUnit('string');
⚠️ **GitHub.com Fallback** ⚠️