Please enable JavaScript to view this site.

An R3 program is written in a free format. Lines of instructions can be written in columns as preferred, with any number of spaces.

Each line, separated from another line by the characters CR LF (Line Feed-ENTER key), must contain only one instruction. An instruction may be extended over several lines as long as the character "&" (ampersand) is inserted at the end of each line to indicate to the compiler that the instruction is not finished. An "&" character is treated as an instruction continuation only if it is at the end of the line (not followed by any character). Otherwise, "&" is treated as character being part of the instruction.

The ";" (semicolon) character introduces a comment: a line preceded by this character remains in the listing, but is ignored by the R3 compiler.

Example:

; single-line instruction

r(27) = 123

Example:

; same instruction extended over two lines

r(27) = &

123

A program written in the R3 language appears as a sequence of sentences that must be written respecting certain grammatical and syntactic rules.

In these sentences will appear words reserved for the language itself (keywords), variable names, names defined by the user, and obviously numbers.

The set of characters that are accepted by the R3 compiler, for keywords and variable names, is as follows:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

a b c d e f g h i j k l m n o p q r s t u v w x y z

0 1 2 3 4 5 6 7 8 9

Plus some special characters:

= . + - * / , : [ ] ( ) " $ _ ; & # tabulator space

The following special characters are reserved for Robox developments:

@ % ! ^ ' ? | \ ~

NOTE: The compiler makes no difference between lowercase and uppercase letters for keywords and variable names (case-insensitive).

Example:

; These three words are correct and equivalent

OUTPUT

Output

oUtPuT

Identifiers

Identifiers are used to name variables, subroutines, jump destinations (labels).

The first character of an identifier must be alphabetic. Subsequent characters may be alphabetic or numeric.

In addition, the use of the underscore ( _ ) is permitted. There are no special limits on the number of characters that can be used.

Example:

; declaration of the identifier PIPPO associated with an integer variable.

INT pippo

; declaration of the PLUTO identifier associated with a label (subroutine name or jump destination)

pluto:

NOTE: R3 keywords cannot be used as identifiers.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC