[NAME]
ALL.dao.data.const

[TITLE]
Constants

[DESCRIPTION]

Constants are declared with keyword const, 
     
   1  const DEFAULT_INDEX = 123
   2  const DEFAULT_NAME  = "abc"
     
Constants can only be initialized with constant expression.

Constants that are declared at the top lexical scope are global constants. And constants 
declared in nested scopes are local constants: 
     
   1  const konst = "global constant"
   2  for(var i = 1 : 5 ) {
   3      const konst = 123
   4      if( i > 3 ) {
   5          const konst = "local constant"
   6          io.writeln( konst )  # Output: local constant
   7      }
   8      io.writeln( konst )  # Output: 123
   9  }
  10  io.writeln( konst )  # Output: global constant
     

Inside class body, const can be used to declare class wise constants, which are stored in
the class objects instead of the instance objects. They can be accessed with the class ob
jects. 
     
   1  class Klass
   2  {
   3      const name = "Klass"
   4  }
   5  io.writeln( Klass.name )