Built-in macros: $version

The $version macro is replaced by the version of the Chora compiler. This corresponds automatically to the version of your installed Embedded Wizard Studio.

Content

major‑version.update‑version

Discussion

The version format is composed of the major and update version, both as decimal numbers, using a . (dot) on the line as the separator. The major-version identifies the generation of Embedded Wizard (e.g. 12). We increment this number each time a new version with new valorable features is published. When we publish an update containing just bug fixes or less important minor enhancements, the major-version remains unchanged while the update-version is incremented.

Following example demonstrates a value resulting from the evaluation of the $version macro. Please note, the number in update-version consists of two digits always:

9.30

12.00

12.05

12.17

The macro $version is used mainly within a string literal to format e.g. messages with the information regarding the tool version used to compile the application:

SomeView.String = "Created with Embedded Wizard Studio $version";

This macro can also be used when you intend to conditionally compile the application. For example, if you want a code section to be executed only when the application is compiled with the version 11.00 or a version belonging to the twelfth generation (12.xx) of Embedded Wizard Studio, you can implement following code at the appropriate location within your component:

$if ( $version == 11.00 ) || ( $version == 12.* ) SomeObject.PerformSomeOperation(); $endif