In a settings file, you can define an expression such as:
Then you can use this in any integer or real as follows:
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:
Now, if the value of oranges or apples change, any new expressions using $fruit as a Macro Expression will be different. For example: