The Musimat Tutorial


About the Musimat Tutorial

The following tutorial introduction to the Musimat programming language is based on Appendix B of "Musimathics Vol. 1", Published by the MIT Press and � 2006 Gareth Loy.

It can be read as HTML text in your favorite web browser, or you can step through the code with your debugger to see it in action.

  1. Open the file MusimatTutorial.cpp.
  2. Plant a breakpoint on the first function call (named B0100()) inside the main() routine at the bottom of the file.
  3. Run the program from within the debugger.
  4. The program will halt at the breakpoint you set.
  5. Step into the function B0100(). You will eventually be returned to the main() subroutine when B0100() returns.
  6. Step into the next function to continue.
  7. You can use your debugger to examine data structures and follow the execution of the code. The output of the Print() statements in the program will appear in another window (Windows) or directly on the console (gdb).

In order to follow the flow of Appendix B of "Musimathics", the tutorial had to be broken into a set of unique functions. You can follow the narrative through the tutorial by using your debugger to step into the next tutorial function when the previous one returns to main(). See the main() function at the bottom of this file for more details.

The section names in this tutorial are the same as Appendix B in "Musimathics". For example, tutorial function B0108() corresponds to the text in section B.1.8 of that appendix.