Parser Marco Expressions

In a settings file, you can define an expression such as:

$ foo = ( 1 + 2 )

Then you can use this in any integer or real as follows:

! a = 1 + $foo

# Becomes...

! a = 1 + ( 1 + 2 )

This in itself is not so useful, as you can calculate the integer in advance instead, however you can define a Macro Expression with variables:

$ fruit = ( oranges + apples )

Now, if the value of oranges or apples change, any new expressions using $fruit as a Macro Expression will be different. For example:

! oranges = 2
! apples = 3
$ fruit = ( oranges + apples )

# This equals 10
! result1 = 2 * $fruit

# Change the value of oranges
! oranges = 4

# This equals 14
! result2 = 2 * $fruit