The following is the original Magenta manual, now almost exactly five years old as I write this (3/18/2000). It is presented typos and all.

The Magenta Partial Reference Manual
------------------------------------

20 March 1995
Brian Connors
Boston College


This document is (c) 1995 Brian Connors until its completion, at which
point it will pass into the public domain.

The following remain unfinished:
-Function call syntax
-calling conventions
-standard libraries
-binary/logical operators
-enumerations

comments and block structure
----------------------------

note: this language, for convenience, will be referred to as Magenta in
these notes until we can come up with something better.

1.1 block structure delineation

The procedural subset of Magenta derives from a hybridization of the
Algol and C models, with a few ideas to itself.  Both an Algol
begin/end and C {} block format are supported.

Magenta is closer to Algol or GNU C than standard ANSI C in the
implementation of blocks in that functions can be local or global.

Although begin/end and {} constructs are interchangeable, they may not
be used together in the same block.

1.1.1 begin/end

Begin/end is the primary form. It is best used for procedure or function definitions:

--this example actually demonstrates both forms, but the prime focus
--is the begin/end clause

function feedthebear (enum[bear] whichone, enum[food] bearfood)

begin
	bool fed;								//if all goes well...
	whichone[call] ();
	try	{
		whichone[eat] (bearfood);
		throw (whichone[eat](armp));		//armp is a global indicating
	}										//zookeeper's arm
	
	return (fed=TRUE);
end;

Begin/end is probably most intuitive when used as shown above, that is
to indicate the beginning and ending of a procedure definition. Note that 
a semicolon must appear after the end statement.

1.1.2 braces

The use of braces as in C is interchangeable with begin/end, but finds 
its best use in other circumstances, such as loop definitions and the 
like where begin/end would be unnecessarily clumsy.  Like begin/end, the
clause must end with a semicolon.

--this loop prints out the numbers from 1 to 10 to the console in increments
--of .5.  

for i(1 10 step .5) {
	print(i,"\n");
};

1.1.3 is:/end

  is:
	...
end ;

This construct is most useful for record or class definitions, although it 
also has other uses.

structure cube is:

	int x;
	int y;
	int z;

end;

This is pretty much syntactic sugar.  The construct also extends to
other forms, such as the cases in a switch block:

switch(i){
	case TRUE:
		print("whaddya, stupid?");
	end;
	case FALSE:
		print("whew, that was close.");
	end;
	default:
		exit;
	end;
}
	
The general case starts with : and ends with end;. The keyword def is
generally meaningless, but is suggested for readability.

1.2 comments

Magenta comments come in three styles, derived respectively from Ada, 
C++, and C.  The third type is actually not a comment but a form of 
conditional compilation directive.

1.2.1 block comments

Block comments are Ada-style, beginning with a double hyphen at the left
margin and terminating with a carriage return.  It is highly
recommended that they not be placed in the actual body of the program.

--This is a Magenta block comment.  The double hyphen only works to the
--end of the line.  It was chosen for readability and unclutteredness.

1.2.2 line comments

Individual comments in a line of code are done with a double-slash a la
C++.  They end with a carriage return.

int foo(15,15);			//what does the foo map look like?

1.2.3 code comments

In Magenta, the /* */ C-style comment is reserved to act as a
conditional compilation directive.  The code within the beginning and
end symbols should be legal code if the conditional compilation
directive placed in brackets after the beginning is used.  Otherwise it
is interchangeable with the other two varieties.

/* */ comments may be nested, but only if they are used for conditional 
compilation and not as block comments.

/* This is a comment, people. */

/* [?_unix]		//the brackets indicate a condition to fill in order to 
				//compile the following code.

--this, on the other hand, should be legal code.

[else]

--this is the code that gets compiled on another machine.

 */
 
Definition symbols can be upper or lower case.  The following are the 
definition-testing symbols:

?condition		if the following condition is true...
!condition		if the following condition is false...
else			assuming the last test was false, do this instead.

Reserved words in the Magenta programming language
--------------------------------------------------

begin		end 		is			case
switch		if			alloc		else
for			step		rerun		continue
break		while		end			do
until		except		wrapped		kibo
and			or			not			xor
with		exit		return		call
play 		punt		catch 		structure
union		int			char		class
wide		long		double		function
procedure 	member		public		private
protected	friend		virtual		container
gc			goto		to			lest
task		priority	It			signal
reciever	xp			yp			zp
rp			ythetap		zthetap		persist
volatile	const		external	evil
static		persist		bool		module
from		as			operator	kill
default		typedef		negative	daemon

Operators in the Magenta Language 
---------------------------------

Operators are predefined with regard to identity and precedence, but
meaning can be overloaded.

operator	default meaning				direction		
------------------------------------------------------------------
()			force precedence
:			member						l->r
~			external label				l->r

-(unary)	negative					l->r
!(unary)	not							l->r
-> 			pointer to (address)		r->l
<-			contents of					r->l
sizeof		size of an object			r->l

++(unary)	increment					operand->operator
--(unary)	decrement					operand->operator

and			bitwise AND					l->r
or			bitwise OR					l->r
xor			bitwise XOR					l->r
~			binary select				l->r
$			binary mingle				l->r

^			exponentiation				l->r

*			multiplication				l->r
/			division					l->r
mod 		modulo						l->r

+			addition					l->r
-(binary)	subtraction					l->r

<< 			shift left					l->r
>>			shift right					l->r

< 			less than					l->r
<=			less than/equal to			l->r
>			greater than				l->r
>=			greater than/equal to		l->r

==			comparison					l->r
<> 			not equal to				l->r

&			logical and					l->r
:=			assignment					r->l

,			comma						l->r

Character sets that support them may substitute the appropriate
symbols for ->, <-, >=, <=, $ (==US cent sign)

Declarations
------------

Simple types:  || ||   |with |;
compound types: || ||   {  }
||;

The alias is designed to be used in conjunction with the typedef qualifier.

Scoping qualifiers
------------------

|...| refers to an implicit identification

|local|--may be declared at any level; will remain in existence until
its declaration block goes out of scope

global--the variable created has unlimited scope after its creation;
implicit at top level

static--scope is limited to the block it's created in, but its value
remains constant until creating block comes back into scope

persist--scope is limited to the block it's created in, but its value
remains constant between invocations of the program

private--accessible only within a module or class

protected--accessible within a class or all derived classes (illegal and redundant for modules)

public--accessible to all parts of the class or module's scope

reciever--accessible to a specified signal block; otherwise local

external--defined elsewhere

kibo--value is local, name is global; thus can have different values depending 
on scope of the variable.  The value of a kibo variable can be defined globally, 
but if reassigned locally it takes on a different value local to that scope, 
while retaining its global value elsewhere.

Type Qualifiers
---------------

const--may not be assigned to or otherwise changed

volatile--may change

evil--will seriously f--- up your system if you mess with it

short
long
wide
double--type- and compiler-specific

unsigned--positive only

negative--negative only

wrapped |[]|--rolls over when the value in the  parameter 
is reached; defaults to MAXINT or the maximum value of the enumeration 
fof integral and enumerated types respectively.

Data types
----------

Note that any data type not explicitly listed is undefined and can thus
do whatever the compiler writer's twisted little mind desires.

char--character data
	char--8-bit ISO Latin-xx characters
	short char--ISO-646 7-bit chars
	wide char--Unicode 16-bit char
	
float--floating point numerals
	float--standard machine float
	double float--double-precision float
	
int--integer numerals
	int--at least 16 bits
	short int--at least 16 bits
	long int--at least 32 bits
	wide int--maximum machine size
	
bignum--library-defined unlimited integral value

Note: Integral types may be assigned a unit (kg, cm, smoot, etc.).
	
ptr--pointer--machine-dependent

cstring--library-defined C string (indeterminate-length array terminated
	with an ASCII NUL (\h0))
	wide cstring--identical to mstring

pstring[]--library-defined Pascal string--may not exceed 255
characters

mstring--native string--identical to C string except an mstring
defaults to 16-bit chars

bool--boolean data--the low-order bit is significant

|array|--contains everything--defined with a bracketed subscript

enum--set of values assigned to specific labels (see section on
Enumerations)

Enumerations
------------

Enumerations are declared using the following syntax:

|| enum { 
1