IF / ELSE / ENDIF Statements

These statements are similar to their BASIC Plus counterparts. The following functions and expressions are supported by IF, with the same syntax as for BASIC:

ABS

ACS

ASC

ASN

ATN

CHR

COS

DATN

DEVICE

EXP

FACT

FIX

FIX

INSTR

INT

LCS

LEFT

LEN

LEN

LOG

LOG10

LOOKUP

MID

RIGHT

RND

SGN

SIN

SPACE

SQR

STR

TAN

TIME

UCS

VAL

 

 

 

The most useful of the above functions, LOOKUP, works slightly differently than the BASIC Plus equivalent. Instead of returning the file size, it always returns –1 if the file exists, else 0. See the example in the MAIN.DO file above.

The following operators are supported:

Relational Operators

 

Mathematical Operators

Symbol

Meaning

 

Symbol

Meaning

=

Equal

 

+

Addition

<> 

Not equal

 

-

Subtraction

#

Not equal

 

*

Multiplication

Greater than

 

/

Division

>=

Greater than or equal

 

^

Raise to power

Less than

 

**

Raise to power

<=

Less than or equal