Programs->R
R Index
Home
  What's New
  Downloads
Programs
  CSS Editor
  TCP/IP
  rInstaller
  R
    Tutorial
    Reference
    Graphics Reference
    Namespaces
  R2
  Java
Publications
  ODBC Browser
  Internet Server

Red Corona
Mail me




R: a Java stack-based interpreter

NEW: R2

R has taken on a whole new persona! Take a look at R2, in its new APL-esque guise complete with all those funny symbols you’ve been using for so long.

Introduction

R is a stack-based language: each operand (argument) is “pushed” onto a stack, then operators (functions) use the top of the stack to operate on. This means a mathematical expression such as:
(1 + 2) - (3 - 2) (equating to 3 - 1, or 2),
... will be entered in R as:
1 2 + 3 2 - -.
The + here uses 1 and 2 as operands, leaving 3 on the stack. The first - then subtracts 2 from 3, leaving 1 on the stack, and the second - subtracts the 1 from the 3, leaving 2.

Experiment with R

Because R is a Java program, it can be run in a browser as an applet. Although this means scripts cannot be loaded, and so makes it only an “experimenting environment”, it is a good place to play with the different operators.

R as an applet: an “experimenting environment”
Page and site © Richard Smith 2001
Please send any comments to richard@redcorona.com - thank you.
 Top   Home