Dark mode

RK 1.2

Overview


RK 1.2 is a compact, block-structured high-level programming language designed by Reynold Kenny in 1972. It is an original language in the spirit of the small systems languages of that period: explicit types, uppercase keywords, fixed-size arrays, value parameters and a small, readable grammar. This release extends the original design with floating-point values, constants, additional loop forms, a CASE statement and a library of built-in numeric and string functions.

The language is described completely in the Language Reference. The formal grammar is in the Formal Grammar.

A First RK Program

PROGRAM "CALCULATOR" {
      REAL A := 12.5
      REAL B := 30.0
      REAL RESULT := A + B

      PRINT RESULT
  }
  FINISH

Language at a Glance

The Example Program

The original distribution included example.rk, an interactive four-function calculator with integer choice selection, REAL arithmetic, POWER, SQUARE ROOT, division-by-zero checking and a repeating menu. It exercises constants, procedures, REAL values, CASE, REPEAT, BREAK, WHEN/OTHERWISE and the POW and SQRT built-ins in one small program.

Design Identity

RK is not a renamed B, C, BASIC or Pascal. Its uppercase command vocabulary, SET assignment, WHEN/OTHERWISE selection, REPEAT/UNTIL loop, FOR/FROM/TO counted loop and CASE/OF selection give it a separate visual and syntactic identity. The bracketed forms are not decoration: each use is defined in the grammar and corresponds to a distinct syntactic position.

Historical Notes

The interpreter was deliberately written in the style of early-1970s C: K&R-style function definitions, declarations at the beginning of a block, fixed-size tables and /* ... */ comments only. The code cannot claim compatibility with one exact 1972 C dialect. A small number of accommodations are confined to the build and the library interface on modern systems.

The source code is not published. It remains in a private archive and is not available for copying or redistribution. See the License.