User Manual | ![]() |
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.
picoBASIC has two different operating modes:
picoBASIC Integer handles data in several ways:
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.
Operator | Operands | Meaning | Example | Result |
+ | 2 | Addition | 5 + 6 | 11 |
- | 2 | Subtraction | 3 - 12 | -9 |
/ | 2 | Division | 5 / 2 | 2 |
* | 2 | Multiplication | 3 * 2 | 6 |
^ | 2 | Exponentiation | 5 ^ 2 | 25 |
MOD | 2 | Modulus | 11 MOD 4 | 3 |
Relational | ||||
= | 2 | Equal to | 1 = 2 | 0 |
< | 2 | Less than | 6 < 5 | 0 |
> | 2 | Greater than | 12 > 3 | -1 |
<= | 2 | Less than or equal to | 6 <= 5 | 0 |
>= | 2 | Greater than or equal to | 12 >= 12 | -1 |
<> | 2 | Not equal to | 1 <> 2 | -1 |
Logical | ||||
AND | 2 | 1 if both bits are 1 | 2 AND 3 | 2 |
OR | 2 | 1 if either bit is 1 | 2 OR 3 | 3 |
XOR | 2 | 1 if only one bit is 1 | 2 XOR 3 | 1 |
NOT | 1 | 1 if bit is 0 | NOT 3 | -4 |
Operator | Operands | Meaning | Example | Result |
+ | 2 | Concatenation | "ABC" + "def" | "ABCdef" |
Relational | ||||
= | 2 | Equal to | "abc" = "abc" | -1 |
< | 2 | Less than | "abc" < "ABC" | 0 |
> | 2 | Greater than | "abc" > "ABC" | -1 |
<= | 2 | Less than or equal to | "abcd" <= "ab" | 0 |
>= | 2 | Greater than or equal to | "abcd" >= "ab" | -1 |
<> | 2 | Not equal to | "abc" <> "ab" | -1 |
©2002 Picodoc, Inc. All rights reserved.