To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Mary (programming language)

From Wikipedia, the free encyclopedia

Mary
Paradigmimperative
FamilyALGOL
DeveloperRUNIT
First appeared1971; 53 years ago (1971)
Typing disciplinestatic, strong
OSCross-platform: Kongsberg Våpenfabrikk SM-4, Norsk Data Nord-10/ND-100, Univac-1100 series, ND-100/Sintran-III, i386, SPARC
Influenced by
ALGOL 68

Mary is a programming language designed and implemented by RUNIT at Trondheim, Norway in the 1970s. It borrowed many features from ALGOL 68 but was designed for systems programming (machine-oriented programming).

An unusual feature of its syntax was that expressions were constructed using the conventional infix operators, but all of them had the same precedence and evaluation went from left to right unless there were brackets. Assignment had the destination on the right and assignment was considered just another operator.

Similar to C, several language features appear to have existed to allow producing reasonably well optimised code, despite a quite primitive code generator in the compiler. These included operators similar to the += et alter in C and explicit register declarations for variables.

Notable features:

  • Dataflow syntax – values flow from left to right, including assignment
  • Most constructs could be used in expressions: blocks, IF, CASE, etc.
  • Text-based recursive macros
  • Overloaded user-defined operators, not constrained to predefined identifiers as in C++
  • Automatic building and dereferencing of pointers from type context
  • Scalar range types
  • Array and set enumeration in loop iterators
  • Dynamic array descriptors (ROW)

A book describing Mary was printed in 1974 (Fourth and last edition in 1979): Mary Textbook by Reidar Conradi & Per Holager.

Compilers were made for Kongsberg Våpenfabrikk's SM-4 and Norsk Data Nord-10/ND-100 mini-computers. The original Mary compiler was written in NU ALGOL, ran on the Univac-1100 series and was used to bootstrap a native compiler for ND-100/Sintran-III. RUNIT implemented a CHILL compiler written in Mary which ran on ND-100 and had Intel 8086 and 80286 targets. When this compiler was ported to the VAX platform, a common backend for Mary and CHILL was implemented. Later, backends for i386 and SPARC were available. Since the Mary compiler was implemented in Mary, it was possible to run the compiler on all these platforms.

Mary is no longer maintained.

YouTube Encyclopedic

  • 1/3
    Views:
    3 235
    2 311
    4 660
  • Writing an Interpreter - Programming Languages
  • Mary livecodes a drum machine
  • Writing a Lisp interpreter in JavaScript - Mary Rose Cook

Transcription

Example

BEGIN
   INT i := 10;          %% Variable with initial value.
   REF INT ri := i;      %% Pointer initialized to point to i.
   INT j := 11;
   j :- REF INT =: ri;   %% Type conversion and assignment
                         %% ri now points to j.
   i =: (ri :- VAL REF INT);     
                         %% Assignment and type conversion
                         %% ri points to j so j is changed.
   IF j > 10             %% Conditional statement with result
   THEN                  %% used inside an arithmetic expression.
      1
   ELSE
      2
   FI + j =: j;
END

See also

References

This page was last edited on 26 April 2024, at 19:39
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.