Ocean Optics Jaz Scripting Language and Scripting Engine User Manual
Page 12
2: Jaz Scripting Engine Architecture
4
013-RD000-000-12- 201010
All variables are global in scope. That means that all variables to be used in the entire script must be
declared in the Variable Declaration section. All variables are visible from both the main program and
from user-defined procedures.
A variable is declared as
Where:
type
= one of the data types in the following Data Types table
optional count = the way an array is declared. See the example below.
Example:
LampIntensity INT_16 declares a single integer while LampIntensity INT_16 40 declares
LampIntensity to be an array of 40 integers. Array indexing is inclusive [0...N-1] for a declaration of
VariableName Type N.
Scripting language is case-insensitive so that VariableOne, variableOne, and VARIABLEONE all
reference the same variable. Therefore, it is illegal to have a declaration section like the following:
VariableOne INT_16
VARIABLEONE INT_16 … error re-declaration or duplicate.
However, you can use any capitalization style you wish in your script since any sequence resolves to the
same variable.
Data Types
Type Name
Contents
Notes
INT_8
8-bit integer
INT_16
16-bit integer
This is the preferred integer form
INT_32
32-bit integer
TEXT
Null-terminated character
string
REAL
Single-precision floating point
SPECTRAL
Represents a spectrum
reading
FILE
File of spectral data
ASC = ascii
CSV = comma separated
RAW = tab delimited
TABLE
2-dimensional array of real
numbers
Meant to be used in computation with sample
spectrum