Use in mathematical expressions

Macro names may be assigned to arithmetic expressions and parts of them. Recursive treatment (nesting) may also be used within mathematical expressions.

It must be ensured that a string in a macro content always combines complete levels (i.e. terms whose results are not influenced by inserting '[' at the start and ']' at the end).

Programing Example

prg_example

Use in mathematical expressions

Right:

N10 "STRING1" = "0.5"

N20 "STRING2" = "5 * 12"

N30 "STRING3" = "SIN[89.5 + \"STRING1\"]"

N40 X[-2 * "STRING1" + "STRING2" + "STRING3"]         (move to X60)

M30

Wrong: Macros contain only incomplete mathematical expressions

N10 "STRING1" = "COS["

N20 "STRING2" = "90]"

N30 "STRING3" = " \"STRING1\" \"STRING2\" "          Error