Programs->R2->Basic Types
Basic Types
Home
  What's New
  Downloads
Programs
  CSS Editor
  TCP/IP
  rInstaller
  R
  R2
    Functions
    How It Works
    Basic Types
    Reference
  Java
Publications
  ODBC Browser
  Internet Server

Red Corona
Mail me




Note: these pages use the APL2741 or APLSans font, both available from Causeway.

R2 Data Types

R2 defines the following basic data types:

  • Integer: an integer number between 0 and $FFFFFFFF. This can be entered in decimal (1652) or hex ($674) notation. Negatives are entered with the high-bar (¯5).
  • Floating point: a floating point number, or an integer greater than $FFFFFFFF, entered in decimal notation (12.7). Negatives are entered with the high-bar (¯1.8).
  • Character: a single character, enclosed in single quotes (eg 'A').
  • String: a collection of characters treated as a unit, enclosed in double quotes (eg "Hello world").
  • Null: a zero-length, or empty, scalar. Entered with the symbol «.

In addition to these simple types, there are also two array types:

  • Character vector: a collection of characters treated as an array, enclosed in single quotes (eg 'R2 is great').
  • Array: a collection of any data, enclosed in square brackets (eg [1 3 'hello world' [17 "Blenheim Ave."] 47]). An array can be infinitely deep (by containing other arrays).

Page and site © Richard Smith 2001
Please send any comments to richard@redcorona.com - thank you.
 Top   Home