beautypg.com

Operator precedence, Labels, 4 operator precedence – Argox PA-20 Basic Programming Manual User Manual

Page 12: 5 labels

background image

PT-Basic Programming Manual Ver. 1.00

11/143

Operator

Operation

Example

NOT

Logical negation

NOT (A% = B%)

AND

Logical and

(A% = B%) AND (C% =

D%)

OR

Inclusive or

(A% = B%) OR (C% = D%)

XOR

Exclusive or

(A% = B%) XOR (C% =

D%)

2.4 Operator Precedence

The precedence of BASIC operators affects the evaluation of operands in

expressions. Expressions with higher precedence operators are evaluated

first. Precedence of BASIC operators is listed below in the order of

precedence from highest to lowest.

Order of Precedence Type of Operation

symbol

Highest

Arithmetic

^

Arithmetic

*, /, MOD

Arithmetic

+, -

Relational

=, <>, >, <, >=, <=

Logical

NOT, AND, OR,

XOR

Lowest

Assignment

=

2.5 Labels

Line labels are used to represent some special lines in the BASIC program.

They can be either integer numbers or character strings.
 A valid integer number for the line label is in the range from 1 to

65279.

 A character string label can have up to 255 characters (if the string

label has more than 255 characters, error can be it cannot be

anticipated).

A character string label that precedes a program line must have a colon

between the label and the program line, but it is not necessary for an

integer label.