Syntax
DEFINE arg1 arg2
Description
The existing variable is assigned a mathematical expression.
Arguments
Minimum quantity: 1
arg1
Value |
Dimension |
Meaning |
name |
TEXT |
Variable name. The variable was created in advance and exists. This name is to be used here to assign an expression to the variable. |
arg2
Value |
Dimension |
Meaning |
expr |
TEXT |
Mathematical expression. The evaluation takes place when the variable is called. |
Scopes
CALC
Examples
DEFINE "hcross" "-hsection(\$sf)"
The expression uses a user-defined table "hsection" and the predefined variable "sf" (current father station). The necessary '$' character must be inactivated for the import. This is achieved by the preceding '\' character. The call is made by "hcross()".
DEFINE "Pythagoras(x,y)" "sqrt($x*$x + $y*$y)"
The distance is calculated. E.g., the call is made by "Pythagoras(3.0,2.0*0.3)".
|
(C) ALLPLAN GmbH |
Privacy policy |