OWBasic for Pocketviewer

Home INTRO Group NEW25 Alphabetical Index

Problems with older programs

A few smaller problems may occur with some older programs:

Coordinates are tested more strictly. Drawing functions (except LINE) will give an error if called with coordinates outside the (unchanged) range of 0 .. 159. Check coordinates with INSIDEG!().

The boolean constants TRUE, FALSE are new keywords, which cannot be used as variables or procedure names.

The code size of the programs is a bit higher because of the new boolean expressions. Programs which use nearly all space in earlier versions may exceed the possible codes size.

There exist integer operators AND, OR and XOR, which work bitwise and the boolean operators AND, OR and XOR, which work on boolean expressions. To make sure, that always the right operator is used, please use brackets around the integer expressions:


IF (a AND 1)>0 THEN .. : ! is bit 1 of variable a set
If used without brackets it would be interpreted as
IF a AND (1>0) THEN ..
which gives a type mismatch: a = integer, (1>0)=boolean.

IF A>0 AND A<10 THE .. : ! a in range 1..9 (no brackets needed)
Here you need no brackets. (But using INRANGE!() is easier.)

Home INTRO Group NEW25 Alphabetical Index