Static and forward

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
   Operators
   Statements and blocks
   Program flow
   Trace facility
   Exception handling
   Functions
      Static and forward
   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
  

Forward or external definition of functions is done by defining the function header followed by a semicolon:

xtern(var b);

External declarations are necessary when using functions that are loaded at runtime (see sysLoadScript and sysLoadLibrary). Usually you will have the external definitions in a file bound in by #include or #loadScript. Functions loaded at compile-time need no forward declaration if they are loaded before use.

Static functions are visible only to the module they were defined in:

// calcXy is a local function not visible
// by other modules:
static var calcXy(var x, var y)
{
  ....
} // calcXy
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>