Mobile BASIC is a programming language for mobile phones and PDA supporting the MIDP-1.0 / CLDC-1.0 environment. This manual documents the commands, operators and functions that are available to a Mobile BASIC programmer.
Operators are used during expression evaluation to indicate the computations that are performed on variables and constants. There are four main groups of operators that are used within Mobile BASIC and these are: Arithmetic Operators, Relational Operators, Logical Operators and Bitwise Operators. In addition there are also parenthesis operators that allow you to change the order of evaluation.
Operators are either binary or unary operators. Binary operators work on two data items, the expression, variable or constant immediately before the operator, together with the expression, variable or constant that follows the operator. Unary operators work on the expression, variable or constant that follows the unary operator.
Logical operators are usually used to combine the results of relational operators in order to make more complex expressions. The result of a logical operator will be either true (1) or false (0).
NOTAll functions within Mobile BASIC are used within expressions. Each functions name is followed by a left parenthesis and a comma separated list of one or more parameters terminated by a right parenthesises.
The MIDP specification defines various facilities that are useful for games programming. These take the form of Up, Down, Left, Right and Fire buttons together with 4 game specific keys known as GAME A, GAME B, GAME C and GAME D. How these features are physically implemented is left to the hardware designers:- For instance, UP, DOWN, LEFT, RIGHT and FIRE could be implemented using a cursor pad, a joystick or simply the phones numeric keypad.
Mobile BASIC provides access to these features via a series of functions that simply return a non zero value if the key is pressed or zero if the key is not pressed.
DOWNString variables are denoted by the variable name ending with a "$" character. String constants are defined by a text string enclosed within double quotation marks.
ASC