Functions; Define_Call - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Parameters:
<INITIAL>
<condition>
<after pass>
The number of loop executions is usually stated at the beginning of the loop, unlike
LONG_WHILE
In Axcess, a typical loop may look something like this:
COUNT =
WHILE (COUNT<10)
{
}
In NetLinx you can write the same loop with a
FOR (COUNT=0 ; COUNT<10 ; COUNT++)
{
}
By defining the loop like this, you clearly see how it is initialized and incremented. No errors appear if
you forget to initialize the

Functions

Axcess only supports one method to create subroutines:
return values very eloquently. If you pass a variable to a parameter of the
change the parameter value within the subroutine, the program updates the value of the global variable in
the mainline code.
NetLinx has two methods for creating subroutines:

DEFINE_CALL

DEFINE_CALL
require a return value. For example, this
projector, and set the lights to Preset 1. The subroutine executes three commands and no values are
returned to the program.
DEFINE_CALL 'PRESENTATION MACRO'
{
}
NetLinx Programming Language Reference Guide
Contains one or more statements that are executed one time before any
FOR loop statements are executed; each statement must be separated by a
comma (,).
The condition for which the loop is evaluated before each pass. If the condi-
tion evaluates TRUE, the FOR loop statements execute. If the condition eval-
uates FALSE, the loop terminates.
Contains one or more statements that are executed after each pass through
the loop statements; each statement is separated by a comma (,). This is
typically a statement that increments the FOR-loop index.
loops.
0
COUNT = COUNT + 1
(* loop statements *)
(* loop statements *)
loop or counter. The
WHILE
is intended to run segments of code that are repeated throughout the program, but don't
SYSTEM_CALL [1] 'SCREEN1' (0, 0, 1, 0, SCREEN, 1, 2, 3, 0)
SEND_STRING VPROJ, "'PON',$0D,$0A"
SEND_STRING RADIA, "'1B',$0D"
statement and clarify how the loop operates:
FOR
loop helps to insure proper structure.
FOR
DEFINE_CALL
and
DEFINE_CALL
creates a macro to lower a screen, turn on the
DEFINE_CALL
NetLinx Programming Overview
and
WHILE
. The
does not
DEFINE_CALL
and then
DEFINE_CALL
.
DEFINE_FUNCTION
19

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents