User Manual 

Overview


picoBASIC Integer is an easy to use, small version of the BASIC language. It is designed primarily for use on handheld devices. It is intended for the person who needs some form of programmability on their personal organizer, without the need for larger, more complex, and often desktop-based tools.

Operating Modes

picoBASIC has two different operating modes:

Working with Data

picoBASIC Integer handles data in several ways:

Expressions

Expressions are sets of operands and operators. Operands may be constants, variables, and even other expressions. Operators are built-in functions that are performed on operands.

Expressions are used in several ways in BASIC. First, they provide the right hand side of assigment statements, such as A = 5 + B. Second, they provide conditional tests in IF statements, such as IF TOTAL < 100 THEN 460. Third, they can be printed as logical evaluations, such as PRINT A$ = "Hello" which will print -1 if A$ = "Hello" and 0 if A$ does not equal "Hello". -1 is a value representing TRUE and 0 is a value representing FALSE.

There are four basic types of expressions: integer, string, relational, and logical. Numeric expressions always evaluate to a numeric result and string expressions to a string result. Relational expressions always evaluate to TRUE or FALSE. Logical (or boolean) expressions always evaluate to a numeric result (16 bit two's complement integers). Also, expressions of any type can be used together to build compound expressions, such as A = LEN(A$+B$) + 2

Below is the set of operators available in picoBASIC Integer, grouped by the two available data types, integer and string.

Integer Operators

Operator Operands Meaning Example Result
+2Addition5 + 611
-2Subtraction3 - 12-9
/2Division5 / 22
*2Multiplication3 * 26
^2Exponentiation5 ^ 225
MOD2Modulus11 MOD 43
Relational
=2Equal to1 = 20
<2Less than6 < 50
>2Greater than12 > 3-1
<=2Less than or equal to6 <= 50
>=2Greater than or equal to12 >= 12-1
<>2Not equal to1 <> 2-1
Logical
AND21 if both bits are 12 AND 32
OR21 if either bit is 12 OR 33
XOR21 if only one bit is 12 XOR 31
NOT11 if bit is 0NOT 3-4


String Operators

Operator Operands Meaning Example
Result
+2Concatenation"ABC" + "def""ABCdef"
Relational
=2Equal to"abc" = "abc"-1
<2Less than"abc" < "ABC"0
>2Greater than"abc" > "ABC"-1
<=2Less than or equal to"abcd" <= "ab"0
>=2Greater than or equal to"abcd" >= "ab"-1
<>2Not equal to"abc" <> "ab"-1



©2002 Picodoc, Inc.  All rights reserved.