Error getting tags :
error 404Error getting tags :
error 404 constant | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
constant
Basics
Expander triangle
Type
Command
Syntax
constant constantsList
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Declares one or more labels to assign to constant values.
Examples

constant defaultName="Jones"
constant entryA="EF9993333WX786",entryB="GJ773281YX342"

Additional Comments
Expander triangle

Use the constant command to assign an unchanging value to a keyword.

Parameters:

The constantsList consists of one or more name=value pairs, separated by commas:

* The name is any string.

* The value is any literal string.

Comments:

Constants can be numbers, characters, logical values, or strings.

A constant cannot be defined as an array, only as a single value.

Note: Choose easy-to-understand names for constants to improve the readability of your code. Use constants as substitutes for long or convoluted strings.

If you place the constant statement in a handler, you can use the constant anywhere in the handler. If you place the constant statement in a script outside any handler, you can use the constant anywhere in the handlers of that script.

Once you have defined a constant, you cannot redefine it in the same handler; doing so causes an execution error.

You can use the constant command to redefine Revolution's built-in constants within a script or handler, but doing so makes your code harder to read and maintain. To find out whether a word is already defined as a built-in constant, use the constantNames function.

Tip: To see a list of built-in constants, open the Documentation window, click Revolution Dictionary, and choose "Constants" from the menu at the top of the window.

User Comments
Expander triangle