
31
8
GP16P Scripting Language Overview
The following Script Language overview may be found in the GP-16PConfiguration Tool’s Help
file. The Overview and Structure sections are included for reference and will give you an idea
how a script is built.
Please refer to the Help File for specific details on writing Statements, Boolean Expressions, etc.
The scripting language used to define virtual machine instructions for the programmable button
panel is a very simple language to learn. If you are familiar with C or Basic or any number of any
other languages you should feel at ease writing scripts for the GP16P in no time.
8.1 - Case Sensitivity
Everything in a script file is case sensitive. The identifiers "xYz" and "xyz" are not equivalent.
8.2 - Comments
A comment starts with two forward slash characters. Once a comment starts all characters are
ignored until the end of the current line. A comment can also start with /* and end with */. The
following example shows some comments.
// This is a comment
// More comments can make your script easier to read
x = x + 1 // Comments can end a line of script code
/*
This is a
multiline comment
*/
8.3 - Actions
Actions are the basic execution unit of a script. A typical script will contain several action
definitions. Events that occur within the GP16P will trigger an action.
Action names can be any unique non-reserved identifier. An identifier can be up to 32 characters
long. The first character must be a letter; the following characters may be letters, numbers or the
underscore character ("_").
8.4 - Global Variables
Scripts may have an unlimited number of global variables. Global variables have visibility
throughout the script file. Every action and subroutine has visibility to a global variable. Global
variables retain their values between execution of each action.