• Main Page
  • Modules
  • Classes
  • Files
  • File List
  • File Members

/Users/garethloy/Musimathics/Musimat1.2/include/Aliases.h

Go to the documentation of this file.
00001 /* $Revision: 1.4 $ $Date: 2006/09/07 08:38:33 $ $Author: dgl $ $Name:  $ $Id: Aliases.h,v 1.4 2006/09/07 08:38:33 dgl Exp $ */
00002 #ifndef ALIASES_H
00003 #define ALIASES_H
00004 
00005 // The Musimat Tutorial � 2006 Gareth Loy
00006 // Derived from Chapter 9 and Appendix B of "Musimathics Vol. 1" � 2006 Gareth Loy 
00007 // and published exclusively by The MIT Press.
00008 // This program is released WITHOUT ANY WARRANTY; without even the implied 
00009 // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
00010 // For information on usage and redistribution, and for a DISCLAIMER OF ALL
00011 // WARRANTIES, see the file, "LICENSE.txt," in this distribution.
00012 // "Musimathics" is available here:     http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10916
00013 // Gareth Loy's Musimathics website:    http://www.musimathics.com/
00014 // The Musimat website:                 http://www.musimat.com/
00015 // This program is released under the terms of the GNU General Public License
00016 // available here:                      http://www.gnu.org/licenses/gpl.txt
00017 
00018 
00021 
00026 
00027 typedef int Integer;
00028 
00033 
00034 typedef double Real;
00035 
00041 
00042 typedef bool Bool;
00043 
00050 
00051 typedef const char* String;
00052 
00058 
00059 #define Repeat while (true)
00060 
00066 
00067 #define Halt exit
00068 
00073 
00074 #define Return return
00075 
00080 
00081 #define Break break
00082 
00087 
00088 #define Continue continue
00089 
00090 
00103 
00104 #define If if
00105 
00116 
00117 #define Else else
00118 
00128 
00129 #define Do do
00130 
00131 
00149 
00150 #define While while
00151 
00152 
00162 
00163 #define Goto goto
00164 
00165 
00179 
00180 #define For for
00181 
00182 
00200 
00201 #define Void void
00202 
00203 
00212 
00213 #define Const const
00214 
00215 
00232 
00233 #define Volatile volatile
00234 
00235 
00236 
00240 
00241 #define True true
00242 
00243 
00247 
00248 #define False false
00249 
00250 
00253 
00254 #define Character char
00255 
00256 
00273 
00274 #define Static static
00275 
00276 
00287 
00288 #define Reference &
00289 
00290 
00299 
00300 #define And &&
00301 
00302 
00311 
00312 #define Or ||
00313 
00331 /*
00332  Switch ( getchar() ) { // read a character
00333         Case 'a': handle_a(); break; // receiving 'a' executes handle_a()
00334         Case 'b': Case 'B': handle_b_or_B(); break; // both 'b' and 'B' executes handle_b_or_B()
00335         Case 'c': handle_c(); // we forgot to put a break statement here!
00336         Case 'd': handle_d(); break; 
00337  }
00338  // What this means is 'c' will execute handle_c() AND handle_d(). 'd' will only execute handle_d().
00339  */
00342 
00343 #define Switch switch
00344 #define Case case
00345 #define Default default
00346 #define Break break
00347 
00348 #endif // ALIASES_H

Generated on Fri Nov 26 2010 16:18:24 for MusimatLib by  doxygen 1.7.2