Unit of measure (UOM) symbol.
It is the base unit class composed by only 1 symbol.
Provide math operations on symbols necessary to build complex (derived) units.
The string format definition of a valid FURY unit symbol definition are as following:
real_offset + real_factor * litteral_symbol integer_exponent@user litteral_symbol integer_exponentwhere
+real_offset + is an optional real literal constant that, if present, must be followed by a +;
+real_factor + is an optional real literal constant that, if present, must be followed by a *;
+litteral_symbol is the literal symbol;
+integer_exponent is an optional integer literal constant that:
+ could be omitted if it is equal to 1;
+ do not have the + sign if positive;
+ must have the - sign if negative;
+@user is a place order for the parser indicating that the alias-conversion definition is not a simple
+ multiplicative-like conversion, but it is a generic user-supplied one.
For example, valid definition are:
s: a second definition; real_offset is omitted because equal to 0 and real_factor and integer_exponent are
omitted because equal to 1;1.E6 * m2: a square kilometer definition;1000 * s-1: a kiloherhz definition;273.15 + K: a Celsius degree definition;dBm = @user mW where the placeholder @user will be set (not by the string parser) to 10 * log(mW).The terms composing a definition can be separated by any white spaces number (even zero).
In the case the user supply a generic conversion alias formula this one overrides the multiplicative-like optionally parsed.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(uom_converter), | private, | allocatable | :: | convert_ | Generic conversion alias formula user-supplied. |
||
| integer(kind=IKP), | private | :: | exponent_ | = | 1_IKP | Exponent of the symbol, e.g. "-1" for Hertz, namely "s-1". |
|
| real(kind=RKP), | private | :: | factor_ | = | 1._RKP | Symbol multiplicative scale factor (used only for converters). |
|
| real(kind=RKP), | private | :: | offset_ | = | 0._RKP | Symbol additive offset (used only for converters). |
|
| type(string), | private | :: | symbol_ | literal symbol, e.g. "m" for metres. |
Convert a magnitude with respect symbol definition.
Convert a magnitude with respect symbol definition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| real(kind=RKP), | intent(in) | :: | magnitude | Magnitude to be converted. |
||
| logical, | intent(in), | optional | :: | inverse | Activate inverse conversion. |
Converted magnitude.
Return the symbol generic conversion alias.
Return the symbol generic conversion alias.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| class(uom_converter), | intent(out), | allocatable | :: | convert_ | The symbol generic conversion alias. |
Return the symbol exponent.
Return the symbol exponent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol exponent.
Return the symbol factor.
Return the symbol factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol factor.
Return the symbol offset.
Return the symbol offset.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The symbol offset.
Return the literal symbol.
Return the literal symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
The literal symbol.
Check if the symbol is defined.
Check if uom_symbol is defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
Check result.
Parse symbol from string.
Parse symbol definition from string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
||
| character(len=*), | intent(in) | :: | source | Source input string definition of symbol. |
Return a prefixed symbol.
Return a prefixed symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | prefix | Other symbol used for prefixing. |
The prefixed symbol.
Set symbol.
Set symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
||
| character(len=*), | intent(in), | optional | :: | symbol_ | literal symbol of the unit, e.g. "m" for metres. |
|
| integer(kind=IKP), | intent(in), | optional | :: | exponent_ | Exponent of the symbol, e.g. "-1" for Hertz, namely "s-1". |
|
| real(kind=RKP), | intent(in), | optional | :: | factor_ | Symbol multiplicative scale factor (used only for converters). |
|
| real(kind=RKP), | intent(in), | optional | :: | offset_ | Symbol additive offset (used only for converters). |
|
| class(uom_converter), | intent(in), | optional | :: | convert_ | Generic conversion alias formula user-supplied. |
Return a string representaion of the symbol.
Return a string representation of uom_symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| logical, | intent(in), | optional | :: | compact_reals | Flag to activate real numbers compacting. |
Raw characters data.
Unset symbol.
Unset symbol.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | self | The uom symbol. |
Overloading = assignment.
uom_symbol = uom_symbol assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Overloading / operator.
uom_symbol / uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Overloading * operator.
uom_symbol * uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Overloading ** operator.
uom_symbol ** real(R8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I2P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I1P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Overloading == operator.
Check if uom_symbol is equal with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Definition of .compatible. operator.
Check if uom_symbol is compatible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Definition of .convertible. operator.
Check if uom_symbol is convertible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Check if the symbol is compatible with another one.
Check if uom_symbol is compatible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Check if the symbol is convertible with another one.
Check if uom_symbol is convertible with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
Check if the symbol is equal with another one.
Check if uom_symbol is equal with another one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | self | The uom symbol. |
||
| type(uom_symbol), | intent(in) | :: | other | The other symbol. |
Check result.
uom_symbol = uom_symbol assignment.
uom_symbol = uom_symbol assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(inout) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
uom_symbol / uom_symbol operator.
uom_symbol / uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol * uom_symbol operator.
uom_symbol * uom_symbol operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| type(uom_symbol), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R16P) operator.
uom_symbol ** real(R16P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R16P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R8P) operator.
uom_symbol ** real(R8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** real(R4P) operator.
uom_symbol ** real(R4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| real(kind=R4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I8P) operator.
uom_symbol ** integer(I8P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I8P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I4P) operator.
uom_symbol ** integer(I4P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I4P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I2P) operator.
uom_symbol ** integer(I2P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I2P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
uom_symbol ** integer(I1P) operator.
uom_symbol ** integer(I1P) operator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uom_symbol), | intent(in) | :: | lhs | Left hand side. |
||
| integer(kind=I1P), | intent(in) | :: | rhs | Right hand side. |
Operator result.