Command line parameters

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
   Jump start
   Command line parameters
   Embedding CSL in batch files
Language
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
  

Csl first saves all command line parameters into a global array named mainArgVals. Then it loads the script given as parameter 1 and calls the function named main.

Check it out by writing a new program args.csl:

#loadLibrary 'ZcSysLib'
 
main()
{
   for (var i=0; i<sizeof(mainArgVals); i++)
      sysLog(mainArgVals[i]);
}

Run this sample with the command:

csl args my name is fred

The output will look like:

csl
args
my
name
is
fred
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>