Or Der Of Pre Ce Dence; Main Functions And Sub-Functions; Local And Global Variables - Maple Systems Silver Plus Series Installation And Operation Manual

Hide thumbs Also See for Silver Plus Series:
Table of Contents

Advertisement

248

Or der of Pre ce dence

The process order of many operators within an expression is called the 'order of precedence'. Priority of the same
kind of operator (From left to right, from top to bottom)
Arithmetic operator: ^ ( * , / ) ( % ) ( + , - )
Bitwise & Shift operators: From left to right within the expression
Comparison operator: From left to right within the expression
Logic operator: Not And Or Xor,
• Arithmetic operator is higher priority than a Bitwise operator
• Bitwise operator is higher priority than a Comparison operator
• Logic operator is higher priority than an Assignment operator

Main Functions and Sub-functions

The macro must have one and only one "Macro_Command main()" function which is the execution start point of
any macro file. Any sub-functions must be pre-defined and written before the main() function.
The format is:
Any other sub functions must be declared before the main() function can use it, for example:

Local and Global Variables

Local variables exist only within the function in which they are defined.
1010-1007, Rev 05
Logic operators:
Bitwise and shift
operators:
Macro_Command main( )
// The main macro code goes here
End Macro_Command
Sub SQR(int MyVar )
// sub routine code goes here
End Sub
Macro_Command main( )
// The main macro code goes here
Result = SQR(MyNum)
called
End macro command
Sil ver Plus Se ries In stal la tion & Op er a tion Man ual
Greater than or
>=
equal to:
Is equal to:
==
Not equal to:
<>
Conditional 'AND':
AND
Conditional 'OR':
OR
Exclusive 'OR':
XOR
Boolean 'NOT':
NOT
Left shift:
<<
Right shift:
>>
Bitwise 'AND'
&
Bitwise 'OR'
|
Bitwise 'XOR'
^
Bitwise
~
complement:
//The sub function "SQR()" is

Advertisement

Table of Contents
loading

Table of Contents