Quick Links:

bal | bbl | bdl | bsl

Component balscm_versiontag
[Package balscm]

Provide versioning information for the bal package group. More...

Outline
Purpose:
Provide versioning information for the bal package group.
See also:
Component balscm_version
Description:
This component provides versioning information for the bal package group. The BAL_VERSION macro that is supplied can be used for conditional-compilation based on bal version information. The following usage example illustrates this basic capability.
Note that since bal is always released in lock-step with bsl, they share common versioning, and the BAL_VERSION will always equal the BSL_VERSION.
Usage:
At compile time, the version of BAL can be used to select an older or newer way to accomplish a task, to enable new functionality, or to accommodate an interface change. For example, if the name of a function changes (a rare occurrence, but potentially disruptive when it does happen), the impact on affected code can be minimized by conditionally calling the function by its old or new name using conditional compilation. In the following, the #if preprocessor directive compares BAL_VERSION (i.e., the latest BAL version, excluding the patch version) to a specified major and minor version composed using the BSL_MAKE_VERSION macro:
  #if BAL_VERSION > BSL_MAKE_VERSION(1, 3)
      // Call 'newFunction' for BAL versions later than 1.3.
      int result = newFunction();
  #else
      // Call 'oldFunction' for BAL version 1.3 or earlier.
      int result = oldFunction();
  #endif