You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is necessary to avoid name collisions or ambiguity between constants declared in the same package but in distinct files, as well as with variables declared in the current scope. It also puts an end to the special treatment of global constants being available directly outside of the scope of their enclosing type.
Add a new GLOBALCONSTANTS syntax element to represent the enclosing type:
PACKAGE forte::core;
GLOBALCONSTANTS Math
VAR_GLOBAL CONSTANT
PI : REAL := 3.14159;
END_VAR
END_GLOBALCONSTANTS
and refer to constants using either:
the full-qualified name forte::core::Math::PI,
the semi-qualified name Math::PI with an import for forte::core::Math (preferred),
the unqualified name PI with an import for forte::core::Math::PI or forte::core::Math::* (discouraged).
The text was updated successfully, but these errors were encountered:
This is necessary to avoid name collisions or ambiguity between constants declared in the same package but in distinct files, as well as with variables declared in the current scope. It also puts an end to the special treatment of global constants being available directly outside of the scope of their enclosing type.
Add a new
GLOBALCONSTANTS
syntax element to represent the enclosing type:and refer to constants using either:
forte::core::Math::PI
,Math::PI
with an import forforte::core::Math
(preferred),PI
with an import forforte::core::Math::PI
orforte::core::Math::*
(discouraged).The text was updated successfully, but these errors were encountered: