Back Previous Next


Linguist basic package - constant

Syntax:

   constant {symbol} {expression}

Keyword handler:

   net.eclecity.linguist.basic.keyword.BasicKConstant.class

Runtime handler(s):

   None.

Function:

Declares a constant numeric value. The names item can be used subsequently in place of the numeric value.

We recommend using a distinguishing feature such as ALL_CAPITALS for constants, to avoid their being mistaken for variables. The compiler won't be confused but you may be.

See also enum.

Example(s):

   constant ONE 1
   constant WIDTH 640


Back Previous Next