Contents - Index



EES allows the user to specify names for constants to simplify their use in equations.  The constants may be strings or values that have dimensions and values for both the SI and English system may be specified.  The constants are stored in the Constants.txt file.  The Constants.txt file should be placed in the working directory.  This file is automatically read when EES is started.  Constants can also be added with the $CONSTANT directive.



The Constants menu item in the Options menu will bring up a dialog displaying all constants that have been predefined.  The list of constants can be reordered by clicking on the column headings.  For example, to display the list of constant names in alphabetical order, click on Name at the upper left of the dialog.  The width of the dialog can be changed by dragging the corner at the lower right.  The width of individual columns can be changed by dragging the column divider in the top row.


Note that constants have a # symbol as the last character in their name.  The # symbol distinguishes constants from variables.  String constants must have #$ as the last two characters in the name.  Like variables, the constants can be used in the equations in the Equations window.  Numerical constants may have associated units which are used when the Check Units command is applied.  However, constants are not variables.  Their values cannot be changed and they do not appear in the Solution window or in the Variable Information dialog.  Constants are displayed with the value and units in the Formatted Equations window. 


Two values are associated with each numerical constant, depending on the choice of unit system (SI or ENG) made in the Unit System dialog.  String constants are only associated with one string. The values and units that are displayed will change if the unit system is changed.  It is, of course, possible to have the same value in both sets of units.


Clicking the Paste button or double-clicking on an item will copy the symbol name into the Equations window at the cursor position and close the dialog window, so that it need not be typed.  The Done button will close the dialog window. 


New constants can be entered directly by editing the Constants.txt file or more conveniently, by using the Add New Constant dialog that appears when the Add button is clicked.   If a new constant is added, a Store button will appear.  Clicking the Store button will store the modified constant information into the current Constants.txt file.  Adding a constant in this manner causes a change to the Constants.txt file.  All EES programs that use this file will have access to the constant that is defined.  In some cases, it may be more appropriate to define a constant just for use within a single EES file.  This can be accomplished with the $CONSTANT directive.