Multi-Tech Systems MTASR1-100 Two basic types of variables are supported, Operator Precedence

Page 59

Appendixes

the argument name in the formal parameter list by the keyword VAR; otherwise, the argument is passed by value. Only variables can be passed by address. Expressions like A+B, where A and B are integer variables can be passed by value but cannot be passed by address.

Two basic types of variables are supported:

INTEGER and STRING

In the STRING, since the ASCII null character is internally used to indicate the end of the sequence, it cannot be part of the string. All other characters, including extended ASCII characters can be part of the string.

There are two types of conditional constructs:

IF and SWITCH

The IF statement is a two-way branching construct. The condition can be an arbitrary expression. The condition in the IF statement should evaluate to an integer or real. If the expression in the IF statement evaluates to non-zero, the control enters the THEN statement, otherwise control enters the ELSE statement.

The SWITCH statement is a multi-way branching construct. The type of conditional expression should be either INTEGER or STRING. The value of the conditional expression is matched against the constraints given in the CASE options, if the value matches a CASE option value, control enters that CASE option. If the values do not match any of the CASE options, and if a DEFAULT option is provided, control continues at the DEFAULT option; otherwise control continues at the statement after the ENDSWITCH. If control enters one of the CASE or DEFAULT statements, all the statements up to the next ENDCASE statement are executed. Each CASE or DEFAULT statement should be terminated by a matching ENDCASE keyword. The SWITCH statement should be terminated by a ENDSWITCH keywork. The DEFAULT statement can be placed anywhere within the scope of the SWITCH statement. There can be only one DEFAULT statement.

There are two types of iterative constructs:

FOR and WHILE

The FOR construct sets the loop control variable to an initial value. The control variable is checked for bounds, and if within bounds, the <statement_list> given is executed; otherwise the loop execution terminates. After each execution of <statement_list>, the control variable is incremented or decremented by a certain value. This is computed as follows: if the STEP expression is given it is the value of the expression, else it is 1. The control variable is incremented if TO is specified, and is decremented if DOWNTO is specified. After updating the control variable the bounds check is done again. The keyword ENDFOR is mandatory at the end of the loop.

The WHILE loop has an expression and a <statement_list>. The expression is evaluated and if the expression is non-zero the <statement_list> is executed; otherwise the loop execution terminates. The keyword ENDWHILE is mandatory at the end of the loop.

Operator Precedence:

Operators are listed in the order of precedence

Unary Operators :-!(unary minus, logical negation)

Binary Operators :*/ + _< > <= >= == ! = && II

All the operators are left associative. Expressions are evaluated completely; so care must be taken while writing expressions. For example, expressions like (a !=0 && b / a) would create run time error.

MTASR1-100

59

Image 59
Contents User Guide Patents User GuideRecord of Revisions Revision DescriptionContents Glossary of Terms Index Introduction and Description Preview of this Guide IntroductionIntroduction and Description Remote Configuration and ManagementService, Warranty and Tech Support Related DocumentationWAN Link Front PanelBack Panel Shunt Positions ShuntsWAN Link SpecificationsCommand Port Ethernet PortMTASR1-100 Installation Unpacking UnpackingChanging Shunt Position InstallationBack Panel Connections Cabling your RouteFinderSoftware Loading and Configuration Loading your Software Do you want to download default setup? dialog is displayed Software Loading and ConfigurationNovell IPX Protocol Default Setup dialog box is displayed Software Loading and Configuration RouteFinder MTASR1-100 User Guide Setting Up Your Remote User Database Call Back User PasswordCall Back Security Enabled Call Back DelayRouteFinder Software Before You Begin Download Default SetupDownload Firmware Configuration Port SetupWAN Device Configuration UninstallIP Port Setup Router ConfigurationRouteFinder Software MTASR1-100 Open Shortest Path First Ospf IPX Setup RouteFinder Software Spanning Tree Setup WAN Port Setup Point-to-Point Setup Frame Relay Setup Frame Relay Dlci Diagnostics Applications SetupScripting Remote Configuration and Management Modem-Based Remote Configuration Procedure Remote Configuration and Management Windows Sockets Compliant TCP/IP Stack LAN-Based Remote ConfigurationRemote Configuration and Management Telnet Remote ManagementRouter Management WEB Browser Management Service, Warranty and Tech Support On-line Warranty Registration Limited WarrantyRecording RouteFinder Information Service, Warranty and Tech SupportTech Support Service If you know the file name Multi-Tech BBSTo log on to the Multi-Tech BBS To Download a fileAbout the Internet About the Multi-Tech Fax-Back ServiceAppendixes 10BASE-T RJ-45 10BASE 2 BNC LAN CablesLink Cable WAN CablesAppendixes RS232C/V.24 * Link CableScript Language Grammar Appendix B Script LanguageOperator Precedence Two basic types of variables are supportedThere are two types of conditional constructs There are two types of iterative constructsExample Script Industry Canada EMC and Safety Directive ComplianceAppendix C Regulatory Information Class a Statement FCC PartTCP/IP Appendix D TCP/IPAppendixes Internet Protocol IP Glossary of Terms MTASR1-100 Glossary MTASR1-100 Glossary MTASR1-100 Glossary MTASR1-100 Glossary MTASR1-100 Glossary Subscriber Loop See Local loop Glossary MTASR1-100 Index IndexSoftware