2 identifiers, 3 maxl keywords – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 64

Advertising
background image

The preceding code will not compile because the compiler scans the input stream from
the first /* to the first */ and considers it a comment. In this case, the first */ occurs at
the end of the initial file string comment. The last */ is then no longer paired with an
opening /*.

Note that the single-line form (//) of a comment followed by end of line can have
surprising effects. Consider this code:

function run()

a=b*(sqrt(c)+ // 5 )

end function

After preprocessing, the preceding code contains errors and appears as follows:

function run()

a=b*(sqrt(c)+

end function

5.1.2

Identifiers

An identifier is a sequence of characters used to denote one of the following:

• Variable name
• Object name
• Function name
• Label name

Syntax

identifier :

{letter}({letter}|{digit})*

letter - one of the following:

_ a b c d e f g h i j k l m n o p q r s t u v w x y z

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

digit - one of the following:

0 1 2 3 4 5 6 7 8 9

5.1.3

MAXL Keywords

Keywords are predefined reserved identifiers that have special meanings. They cannot
be used as identifiers in your program. The following keywords are reserved for
MAXL:

Syntax

break
case
const
continue
else
elseif
end
exit

float
for
function
global
goto
if
int
otherwise

reset
return
switch
TRACE
wait
waitvar
while
until

AXIS
VECTOR
GROUP
PROGRAM
IO
NODE
TRJ

m_din
m_dout
m_ain
#define

Maestro

Software Manual

MAXL Program Language

MAN-MASSW (Ver. Q)

5-2

Advertising