We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to declare a constant in two different scopes:
A constant can be accessed from all functions in that package. This constant needs to be declared out the functions and immediately initialized.
A constant can be accessed from only elements in the same function where declared.
The text was updated successfully, but these errors were encountered:
Package Const (like Global Const but visible only in package namespace) are declared in the same way as Function Const but in different positions.
Examples: const int a=1 const float b=1.0 const string c="text" const bool d=false
const int a=1
const float b=1.0
const string c="text"
const bool d=false
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
How to declare a constant in two different scopes:
Package Const
A constant can be accessed from all functions in that package. This constant needs to be declared out the functions and immediately initialized.
Function Const
A constant can be accessed from only elements in the same function where declared.
The text was updated successfully, but these errors were encountered: