Chapter 8: preprocessing, 8 preprocessing, Hapter – Teledyne LeCroy Merlins Wand - CSL manual (CATC Scripting Language Manual) User Manual

Page 31: Reprocessing

Advertising
background image

25

CATC Scripting Language for Bluetooth Analyzers

CATC

Manual Ver. 1.21

C

HAPTER

8: P

REPROCESSING

The preprocessing command

%include

can be used to insert the contents of a file

into a script. It has the effect of copying and pasting the file into the code. Using

%include

allows the user to create modular script files that can then be incorpo-

rated into a script. This way, commands can easily be located and reused.

The syntax for

%include

is this:

%include “includefile.inc”

The quotation marks around the filename are required, and by convention, the
included file has a

.inc

extension.

The filenames given in the include directive are always treated as being relative to
the current file being parsed. So, if a file is referenced via the preprocessing
command in a .dec file, and no path information is provided (

%include “file.inc”

),

the application will try to load the file from the current directory. Files that are in a
directory one level up from the current file can be referenced using

“..\file.inc”

,

and likewise, files one level down can be referenced using the relative pathname
(

“directory\file.inc”

). Last but not least, files can also be referred to using a full

pathname, such as

“C:\global_scripts\include\file.inc”

.

If a file is not found in current directory, application will try to find it in shared
directory Scripts\Shared\.

Advertising