Operators
Operators can be used with variables in calculations. The result of a calculation can be assigned to another variable or used as a shape definition value.
Operators can be used in all lines of the type file, except the status line, title line and hole description line.
The following operators can be used:
+ | addition |
- | subtraction |
* | multiplication |
/ | division |
^ | exponentiation / root |
S | sine function |
C | cosine function |
T | tangent function |
s | arcsine function |
c | arccosine function |
t | arctangent function |
A | conversion of end type slanted side to angle (in degrees) |
B | conversion of end type slanted side to interior angle (in degrees) |
I | rounding to the smaller numeric value (-1 or 1) |
i |
rounding to the nearest whole number towards zero (1.000000 to 1.9999999 will be 1) |
M | returns 1 if the remainder is more than 0 else it returns 0 |
Operators can be used in combination of variables and real numbers.
Examples:
R1+V1
V1+R1
R1*H1/V1*B1
V4+114
4*10.5
Upper case characters are used for the operators, except for arcsine, arccosine and arctangent, for which lower case characters are used.
The operators are evaluated from left to right. Thus, they do not have an order of precedence (such as, for example, addition is always performed before subtraction).
Example:
R2*R1/V1-R4^V7
This calculation is processed as follows:
R2*R1=result/V1=result-R4=result^V7= result
* multiplication
/ division
- subtraction
^ exponentiation (If V7 equals 0.5, the root is extracted from the result (sqrt).)
The sine, cosine, and tangent functions are exceptions to this rule.
Example:
V1SV2*R
This combination is processed as follows:
V1SV2=result*R1=result
S sine function ; the sine of V2 is multiplied by V1
* the outcome is multiplied by R1
This produces the final result.