const
statement
Syntax
ConstStatement :
const
IDENTIFIER:
Type=
Expression
A const
statement introduces a named constant value. Constants are either directly inlined wherever they are used or loaded from the contract code depending on their type.
Example:
const TEN: u256 = 10
const HUNDO: u256 = TEN * TEN
contract Foo {
pub fn bar() -> u256 {
return HUNDO
}
}