Constants:
I need to define constants that have a value of type single (and also double).
I know that the Const instruction is used only for strings.
How can I make use single or double constants?
Example:
' --- CONSTANTS ---
Const LN2 As Single = 0.69314718056
Const INV_LN2 As Single = 1.44269504089
Const EPSILON As Single = 0.000001
Last edit: jackjames 2025-05-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Constants:
I need to define constants that have a value of type single (and also double).
I know that the Const instruction is used only for strings.
How can I make use single or double constants?
Example:
' --- CONSTANTS ---
Const LN2 As Single = 0.69314718056
Const INV_LN2 As Single = 1.44269504089
Const EPSILON As Single = 0.000001
Last edit: jackjames 2025-05-10
Please examine the examples we tested against.
https://github.com/GreatCowBASIC/Demonstration_Sources/tree/fe022f400193dfaea2376fe41ec3faf216a1f4f1/AdvancedVariableSolutions/SingleVariableType_Solutions
The reason for all the different chips? They are different memory architectures and we needed to test against all memory architectures.
Constants examples are shown.
Note: We tested against Singles. Doubles may work but you need to test.