Using Units in Element Input Fields
When you enter units within an input fieldfor an element, you can do so by simply inserting them after the values in your expression:
You must, however, abide by several rules to ensure that the expression you enter can be unambiguously interpreted by GoldSim:
-
Within a unit string, you cannot have any spaces. For example, meters per second must be entered as “m/s” rather than “m / s”.
-
In general, you should enter a space after each unit string. In some cases, this space is required to ensure that the expression can be unambiguously interpreted (e.g., if the unit string is followed by a subtraction or division). In other cases, even if GoldSim is able to unambiguously interpret the expression, it is good practice to add a space after unit strings Strings containing only unit abbreviations used to define compound units (e.g., m/sec, lbf/m2). to make the expression more readable.
You can also explicitly identify the units by enclosing them in braces:
Braces are not required, but they can help make expressions more readable. Moreover, when you use them, it is not necessary to abide by the two rules mentioned above.
Note: Braces can only be used in an element's input fields. You can not use braces when defining the display units The units (e.g., m, g, $/day) in which an output is displayed within GoldSim. for an element.
In general, you only append unit strings to numbers. You should never append a unit string to an output name (a link) which itself has dimensions An output attribute for an element that defines the dimensionality (in terms of Length, Time and other fundamental dimensions) of the output. (this will result in a warning message). You can, however, append units to an output name or expression if the output or expression is dimensionless:
A m + 4 ft | OK if and only if A is dimensionless |
(A*B) ft | OK if and only if (A*B) is dimensionless |
- Automatically Appending Units
- Creating New Units for Items (Such as Widgets)
- Creating New Units
- Dealing with Currency Units
- Dealing with Temperature Units
- Display Units for Dates
- Managing User-Defined Units
- The GoldSim Units Manager
- Understanding Units for Month and Year
- Unit Casting
- Using Dimensions and Units
- Using the Percentage Unit Symbol
- Using Units in Element Input Fields
- Viewing and Creating Units