Science Fair Projects Ideas - Mary programming language

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Mary programming language

Mary is a rather obscure programming language perpetrated by RUNIT at Trondheim, Norway in the 1970s. It borrowed many features from ALGOL 68 but was desgined for machine oriented programming.

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 looked particularly odd to most programmers, with the destination on the right, since assignment was just another operator.

There were several language features that appear to have existed to allow programmers to produce reasonably well optimised code with what must have been a very 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 may 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 was 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.

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
Last updated: 08-29-2005 02:03:34
10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice