Var and const

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
   Comments
   Numbers
   Literals
   Var and const
      Arrays
      Initialization
      Static and extern
      Dynamic relocation
   Operators
   Statements and blocks
   Program flow
   Trace facility
   Exception handling
   Functions
   Predefined identifiers
Directives
System library
String library
Math library
Regular expression lib.
File library
Database library
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  

There is only one single variable type in CSL: var

A var may hold any number or string. Additionally there may by a const qualification; however you don't write const var in CSL but simply const.

Examples:

var x, y;
const xMax = 80, yMax = 25;

While var's may change contents during program execution, const's cannot be changed after declaration.

var's and const's may be defined anywhere in CSL, as known by C++:

foo()
{
  const x = 7;
  for (var k=1; k < x; k++) {
    var y = k * 3;
    sysLog(y);
  }
}
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>