GEORGE (programming language): Difference between revisions

Content deleted Content added
Robin400 (talk | contribs)
Created page with 'In 1957, Charles Leonard Hamblin invented the programming language GEORGE.<ref> C. L. Hamblin [1957]: An addressless coding scheme based on mathematical notation...'
 
Robin400 (talk | contribs)
m improved expression
Line 1:
In 1957, [[Charles Leonard Hamblin]] invented the programming language GEORGE.<ref>
C. L. Hamblin [1957]: An addressless coding scheme based on mathematical notation. Proceedings of the First Australian Conference on Computing and Data Processing, Salisbury, South Australia: Weapons Research Establishment, June 1957.</ref>
<ref>C. L. Hamblin [1957]: Computer Languages. The Australian Journal of Science, 20: 135-139. Reprinted in The Australian Computer Journal, 17(4): 195-198 (November 1985).</ref>
Line 11:
where 'dup' meant 'duplicate the value'.
 
Following the reverse Polish form, an assignment statement to evaluate the formula y = a.x**2 + b.x + c was written as a x dup * * b x * + c + (y) .
was written as a x dup * * b x * + c + (y) .
 
The computer evaluated the expression was evaluated as follows: the values of a, then b, were pushed onto the top of the accumulator stack; 'dup' caused a copy of 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 produceproduct (a*x**2) to be pushed onto the top of the accumulator stack. And so on the 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 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 (;).