====== 5.1 Constants ====== [[dido:public:s_cli:05_contents:01_prt:04_dll:start| Return to DidoDLL]] ===== Purpose ===== [[dido:public:s_cli:05_contents:01_prt:06_dddl:constant| Return to Top]] A **Constant** is a symbolic name that captures a value does not change while a program is running and is usually used for capturing initialization or site specific parameters. Constants are in contrast with variables, which are symbols represent different values that can change during the execution of program. A constant can be a: * **number** such as ''25'', ''3.6'', ''3.14'', etc. * **character** such as the character '''a''', '''$''', '''_''', etc. * **text string** such as ''“Bitcoin”'', ''"Hyperledger"'', ''"Medical Records"'', etc. ===== Syntax ===== [[dido:public:s_cli:05_contents:01_prt:06_dddl:constant| Return to Top]] DEFINE CONSTANT AS ; ==== Where ==== [[dido:public:s_cli:05_contents:01_prt:06_dddl:constant| Return to Top]] * **ConstantName** ::= textual name associated with the Constant * **SimpleExpression** ::= NumericConstant | CharacterConstant | StringConstant ==== Examples ==== [[dido:public:s_cli:05_contents:01_prt:06_dddl:constant| Return to Top]] DEFINE CONSTANT Precision AS 2 DEFINE CONSTANT Version AS 3.5.1 DEFINE CONSTANT Currency_Symbol AS '§' DEFINE CONSTANT Currency_Name AS "My Coin" /**=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- /* To add a discussion page to this page, comment out the line that says ~~DISCUSSION:off~~ */ ~~DISCUSSION:on|Outstanding Issues~~ ~~DISCUSSION:off~~