Variables can be added from one of the following places:
|•||The Variables Dialog: select Edit Variables from the Tools menu, or press <Shift+F2> in the main window.|
|•||In the Project Tree, press <Ins> or right click and select Add Variable.|
|•||In an action window, press F3 in any text field.|
When adding or editing a variable, the following dialog is displayed:
The name by which you will refer to the variable in your project.
In an action you reference the variable as follows, eg. %BUILDNUM%
In a script you reference the variable by name, without the % signs.
Variables can be grouped for display purposes, this makes it easier to find when working with projects that have a lot of variables. Child groups can be created by using dots in the group name, for example in the image below the group name for Var3 is Parent.Child
By default, variables in FinalBuilder are Variants. Variants can contain various types, which makes them very versatile. They can however be problematic on some occasions. For example if you wanted to store 03 in a variable, the Variant's type inference would deem that to be an integer, and store it as an integer. When you later retrieve that value, you would get 3, not three. Setting the Basic Type to string would resolve this issue, since the value would always be stored and and retrieved as a string.
When the basic type variable is set to other than Variant, you can specify a format string which will be used when ever the variable's value is evaluated in a text field in FinalBuilder. See these topics for valid format strings :
The variable will be set to this default value when a build is started. Once the variable is created, changing the default value does not change the current value. To reset the current value to the default value, use a Reset Variable to Default action.
Make Available as Environment Variable
Project and User Variables can be made available as environment variables to applications that are executed by FinalBuilder.
This will treat the variable as a "macro" or "function". It's value will be re-evaluated whenever it is referenced and it cannot be set
The variable value will be saved between FinalBuilder executions.
See the Variables Overview for details on the variable flags.