Contents - Index
$CheckUnits ON/OFF and AutoOn/AutoOff
The CHECKUNITS directive controls whether the unit checking algorithms will be applied to the equations that follow. The format of this directive is
Like other directives, $CHECKUNITS should be on a line by itself.
By default, unit checking is on for all equations. When EES encounters a $CHECKUNITS Off directive, equations that follow will not be subject to unit checking. $CHECKUNITS On restores the unit checking to the equations that follow. For example, the following CHECKUNITS directives would eliminate the unit checking warning that would normally occur because the units of the constant 3 are not specified
X=3 + 4*Y + 5*Y^2
Automatic unit checking is controlled with the Check Units Automatically option is set in the General Tab of the Preferences dialog. When automatic unit checking is enabled, the unit consistency of all equations will be checked each time the Solve or Solve Table command is applied. The results of the unit checking will be summarized in the Equations window. Also, when automatic unit checking is on, the Residuals window will display a Units column indicating OK, ? or X for the status of the unit checking of each equation. OK indicates that the units appear to be correct. ? indicates a problem was found. X indicates that the equation was not checked for unit consistency. The X will appear if the equation follows a $CHECKUNITS Off directive or if the unit checking was disabled for this equation by right-clicking on it in the Residuals window.
$CHECKUNITS AutoOn/AutoOff overrides the setting in the Preferences dialog. To ensure that automatic unit checking is on, place the following directive at the top of the EES file.
Unit checking can also be turned on or off by clicking in the Unit Chk cell in the status bar at the bottom of the Equations window.