|
||||||||||||
|
|
||||||||||||
ConstantsDeclares constant into enclosing script, class or interface. Constants cannot be re-assigned after initialization although the value itself can be changed provided that it is mutable. If expression used in initialization evaluates to constant value at compile time it is called static initializer, otherwise it is called non-static initializer. Typically expression involving only operations between literals evaluates to constants.
Non-static initializer of constants (and variables) are placed into hidden
initialization function in order of declaration, depth first when descending
into classes and interfaces. Therefore it is important to mainitin that order of
declaration such that referred entity is declared before referrer. Entities referred
before initialization contains `` constant := "const" constant-decl ( "," constant-decl )* ";" constant-decl := symbolname "=" exprinitializer
|
||||||||||||
|
|
||||||||||||