LET# and STO#¶
One can define variables to be used in the following records. After the leadin
LET# (only valid
within current program) or
STO# (value will be saved to database) the name of the variable is
appended directly (up to 16 characters of an alpha-numerical text, 1st character has to be a
letter) and an optional index. For temporary variables a simple numerical positive value may
be also used as name. The variables can be used then instead of numbers. This item is
followed a separation character and the value to be assigned to the variable.
The value may be either numeric or a literal inclosed in quotes.
STO# do not alter the currently defined
record name and thus must be given in each assignment. Names of variables must not contain
special characters or collide with a reserved sequence of characters like (SIN, COS or SQR).
Instead of one numerical value a list of values or a primary generation instruction or a literal
may be entered. In this case the rest of the values is assigned to the variables following the
input variable. This defines an array if a named variable is used.
The unit of a variable is depending on the context, where this variable is used. Thus it is not
possible in general to use the same variable for a section definition in
[mm] ] and a system
[m]. But it is possible to assign a unit to a variable, then the given value will be
converted immediately and the value can be used everywhere. If a variable has been assigned
a unit, it will be inherited to all other variables and expressions. However this will also trigger a
check if the obtained unit is allowed for the current use.
If for example a stress is expected and defined as #P/#A, both variables may have no unit,
#P may be a force and
#A an area, or
#P may be a load per length while
#A is a width. If
a constant is added or subtracted to a variable, the constant will be taken as specified in the
An array has for all members the unit which has been defined for the item with index 0.
A variable is used if a leading
# sign allows the clear identification as a variable name. If the
expression starts with an additional leading = character, all unidentified characters will be taken
as variable names.
For local usage the legacy convention to use scalar variables with pure number between 1 and 9999 instead of a name is still supported.
LET#TXT 'My Text'
LET#A 4,5,6 7,8,9
LET#B #A(2:3) #A(5:6)
LET#B 20[mm] LET#D 1.5[m] LET#A #B*#D ! Assignment with unit: A is 0.3[m2] LET#X #B*#D[-] ! Assignment without unit: A is 0.3[-]
If a variable is assigned to an expression, the expression is calculated first and then its value is assigned to the variable.
To print variables for debugging purpose you may use the construct PRT# with a similar syntax for addressing the variable name. The name of the variable is expected without separation characters immediately behind the #. For more comfort one should use TXB / TXE or < TEXT > within literal text.
Variables with a name may be saved permanently in the database. The command STO#name will save the current or specified value of this variable in the database, which then can be used by all other programs accessing the database from that. E.g.
STO#C 30 ! Assignment and storage of the variable in the database
If a save variable should be removed from the database there is the command
For this case it is also allowed to specify wild card characters. The commands
DEL#A?00 will delete all variables with that pattern. The use of
DEL# within a control construct
like a loop or an IF-block may yield unexpected results.
For special cases it is possible to reinitialize a variable with the last saved value with the following commands:
RCL#ALL(read all named variables)
RCL#name(read one named variable/array)
RCL#name(3)(read one entry of an array)
RCL#name cdbfile(read variable from another CDB)
There are some RESERVED NAMES which are automatically created by a programm run. The user may use and redefine those names however within his CADINP-data block with new values.
VERSION(1)will be preset with the version number of the Release (dll) and the program itself, allowing to define common input data for multiple versions.
#PIwill be preset to 3.141593.
The arrays of variables
MAT_MASSas well as
SCT_REINare redefined after a print or evaluation of system statistics. They contain the masses (MASS) and reinforcements (REIN) of all groups (
GRP_) and section numbers (
SCT_) or Materials (
MAT_), where the index 0 contains the total sum.
All other variables start with the first three characters of the program creating them followed by an underline:
ASE uses the array
ASE_ITERas follows: *
ASE_ITER(0)= first loadcase number *
ASE_ITER(1)= last loadcase number *
ASE_ITER(2)= last achieved load factor
Variables of array
AQB_USAGEwill be set by AQB with the usage factors of design tasks of the last input block.
All variables starting with
OPT_are reserved for
The CADINP variables are arrays of real numbers (DOUBLE)
The variable types
STOwill be treated differently. The
LETvariable will be used locally only inside one block
STOvariable will be saved inside the database an can be used anywhere inside the
You may also assign literal with form
Literals larger than 8 letters will be saved as an array
#variable(0) = 'String-L', #variable(1)='iteral'
It is possible to get access to different parts of the literal by using a specific index for begin and end (similar to FORTRAN). The start index begins with
Arrays will be defined as a list, divided by comma, without any blank lines
Descriptions and literal names are not directly accessible, because they were saved in the database as integer values (Definition as
With the function
LIT()the values can be saved as readable text variable in
LET#VARIABLE 1,2,3 !Is the same as LET#VARIABLE(0) 1 LET#VARIABLE(1) 2 LET#VARIABLE(2) 3