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
bool
It is not possible to define a bool const, it is automatically created as int const.
int
This causes issues when passing as a bool parameter or when passing to storeBool.
storeBool
Such constants can be used to make code more self explanatory and easier to understand, for example:
... const ONLY_NECESSARY = true; const ALL_DATA = false; ... fun loadData(onlyNecessary: bool) { ... if (onlyNecessary) { return; } ... } ... fun onInternalMessage(myBalance: int, msgValue: int, msgFull: cell, msgBody: slice) { ... loadData(ALL_DATA); ... } fun onExternalMessage(inMsg: slice) { ... loadData(ONLY_NECESSARY); ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It is not possible to define a
bool
const, it is automatically created asint
const.This causes issues when passing as a
bool
parameter or when passing tostoreBool
.Such constants can be used to make code more self explanatory and easier to understand, for example:
The text was updated successfully, but these errors were encountered: