GEORGE (programming language)
GEORGE (programming language)
Main page

GEORGE (programming language)

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
GEORGE (programming language)

GEORGE (General Order Generator) is a programming language invented by Charles Leonard Hamblin in 1957. It was designed around a push-down pop-up stack for arithmetic operations, and employed reverse Polish notation. The language included loops, subroutines, conditionals, vectors, and matrices.

Algebraic expressions were written in reverse Polish notation; thus, was written a b +, and similarly for the other arithmetic operations of subtraction, multiplication, and division.

The algebraic expression was written a x dup × × b x × + c +, where 'dup' meant 'duplicate the value'.

Following the reverse Polish form, an assignment statement to evaluate the formula was written as a x dup × × b x × + c + (y).

The computer evaluated the expression as follows: the values of a, then x, were pushed onto the top of the accumulator stack; 'dup' caused a copy of the top-most value (x) to be pushed onto the top of the accumulator stack; Multiply (×) caused the top two values, namely, x and x, to be removed (popped) and multiplied, returning the product to the top of the accumulator stack. The second multiply (×) then caused the top two values on the stack (namely, a and x**2) to be popped and multiplied, and the product (a×x**2) to be pushed onto the top of the accumulator stack. And so on the remaining components of the expression. The final operation, namely (y), returned the value of the expression to storage without changing the status of the accumulator stack.

Assuming that the value on the top of the accumulator stack was not required immediately, it would be removed (cleared) by using the operator (;).

The following program reads in eight values and forms their sum:

Manipulation of vectors and matrices requires subscript notation. In GEORGE, the subscript(s) preceded the vector or matrix name. Thus A(j) was written j | A. The following program reads in vector a of 10 values, then forms the squares of those values, and finally prints those values.

See all
User Avatar
No comments yet.