Conditionals; Select; If...else; Select...active - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Language Elements

Conditionals

IF...ELSE

The
IF...ELSE
condition evaluates to true, the statement(s) associated with it are executed; otherwise, statements are not
executed. An example is:
IF (<conditional expression 1>)
{
}
ELSE IF (<conditional expression 2>)
{
}
ELSE
{
}
Regarding

SELECT...ACTIVE

The
SELECT...ACTIVE
blocks based on the evaluation of a series of conditions. The first block whose
evaluates to true is executed; the remaining blocks are ignored. If no
no statements are executed. An example is:

SELECT

{
}
32
If it is non-zero, the channel associated with the device is turned on.
If it is zero, the channel is turned off.
statement provides a structure for conditional branching of program execution. If a
(* statements for condition 1 *)
(* statements for condition 2 *)
(* statements for all other conditions *)
statements:
IF
is optional.
ELSE IF
Braces are generally recommended in all cases but are only required if multiple statements are
assigned to a given condition.
statements may be nested to any number of levels.
IF
statement provides a programming structure for selective execution of code
ACTIVE (<condition 1>) :
{
(* statements for condition 1*)
}
ACTIVE (<condition 2>) :
{
(* statements for condition 2*)
}
ACTIVE (<condition n>) :
{
ACTIVE (1)
(* statements for condition n*)
}
ACTIVE
condition evaluates to true,
ACTIVE
NetLinx Programming Language Reference Guide
condition

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents