Macro Programming Language 116
Deko500 User’s Guide
MACRO PROGRAMMING LANGUAGE
The Deko500 Macro Programming Language combines many of the features of C and
BASIC. It supports many standard programming constructs such as real and integer
arithmetic, variables, arrays, objects, loops, conditional statements and subroutines.
Since each topic in this chapter builds upon information covered in previous topics,
we suggest you read the topics in the order presented, especially if you are new to
programming.
If you have done some programming, a quick review of this section may be all you
need to start writing your own Deko500 macros.
COMMANDS
Commands are the basic building blocks of any macro. In macros, commands are
similar to the verbs, or action words, we use in speech.
A command is a direct instruction to Deko500 to perform a function. A Deko500
command may include alphanumeric characters and underscores (_). The first
character may not be a number. A few examples of valid commands are:
justify
rotate
str2num
edge_shader
Deko500 commands fall into several categories. Some categories correspond directly
with items on the Deko500 menu bar (e.g., File, Edit, Channel, Layer, Macro,
Sequence, etc.). Other categories exist for commands that are language specific, such
as program flow commands (e.g. if, while, return) and mathematical
functions (e.g., sqrt, cosine).
The Deko500 Commands section in this manual lists all Deko500 commands by
category.
COMMAND SYNTAX
Earlier, we compared commands to verbs. Just as adverbs modify a verb, parameters
modify a command.
Each command’s parameters are specified in an order particular to that command.
The example below shows the usual order of parameters for the justify command:
justify [horizontal=] [vertical=]
In addition to a specific position, each parameter has a name, a keyword, such as
“horizontal”, “vertical”, etc. Because each parameter has a specific position in
command declaration, however, using a keyword to assign a value is necessary only
when the parameter is specified out of its usual order.
Even then, you may abbreviate a keyword to only as many characters as necessary to
avoid ambiguity.
Here are several possible variations of the justify command:
justify default (unchanged) justificatio n
justify left bottom horizontal left; vertical bottom