Built-in macros: $version

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

Content

major‑version.minor‑version

major‑version.minor‑version.release‑version

Discussion

The version format is usually composed of the major and minor version as decimal numbers, using a . (dot) on the line as the separator. Internally released Embedded Wizard Studio versions as well as versions we decided to release in order to fix problems may additionally contain a third decimal number component expressing the release version. Following example demonstrates a value resulting from the evaluation of the $version macro:

7.11

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 7.11 or a version belonging to the eighth generation (8.x) of Embedded Wizard Studio, you can implement following code at the appropriate location within your component:

$if ( $version == 7.11 ) || ( $version == 8.* ) SomeObject.PerformSomeOperation(); $endif