BaseUnit

unit-functions BaseUnit

concept

  1. BaseUnit is a type of values-unit, for which the metric and value-type are explicitly configured.
  2. BaseUnit() is a function to configure a values unit as base unit.

This page describe the BaseUnit() function.

syntax

  • BaseUnit(metric, valuetype)

definition

BaseUnit(metric, valuetype) configures values units as base units, e.g. meter or second.

The metric of the new unit is configured as first argument.

The value type of the new unit is configured as second argument.

applies to

  • literal metric as string value
  • valuetype with any value type, although usually only value types of the NumericGroup are used in base units.

example

container units
{
   unit<float32> m  := BaseUnit('meter', float32);
   unit<float32> m2 := m * m;
}

result: configured base unit m and used in a derived unit m2.