Pinnacle Speakers FXDEKO Portable Generator User Manual


 
160 Working with Macros
FXDeko User’s Guide
COMMENTS
A comment is text within a macro that does not affect the function of the macro.
Comments make macros easier to analyze and edit, especially if the macro was
written some time ago or written by another programmer. Many programmers
consider a program incomplete without comments. You may find the same to be
true of your macros.
A single-line comment starts with a pound sign (#). FXDeko ignores text to the
right of the pound sign.
# This comment is on a line by itself.
command # This one shares a line with a command.
Another way to create a comment is to precede the comment with /* and close it
with */. FXDeko ignores text between /* and */. This way, you can create
multiple-line comments.
/* This is a multiple-line comment.
None of this text affects the function
of this macro; FXDeko ignores
every line of it */
CONDITIONAL COMMANDS AND LOOPS
Conditional commands instruct FXDeko to execute specific commands only
under certain circumstances. FXDeko supports the conditional commands if,
else and elseif.
The if command includes a test expression, which evaluates to zero (false) or
non-zero (true). A list of one or more commands, then an end command, follows
the if command:
if expression=
# commands
end
If the expression is true, FXDeko executes the commands between if and end.
The if command is often used with the else command:
if expression=
# commands
else
# commands
end
If the expression is true, FXDeko executes the commands between if and
else; otherwise, the commands between else and end are executed.
You can introduce more conditional actions by nesting conditions…
if $a==1