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.
- To read it as text, click on the "Files" tab. You will see a list of all files that make up the tutorial. Click on the first file, B0100(), which corresponds to "Musimathics V1", appendix B, section 1. Continue with the tutorial by clicking the links for subsequent files.
- The best way to go through the Tutorial is using a debugger such as gdb, or the one provided in Microsoft Visual .NET C++. To do so, follow these steps:
- Open the file MusimatTutorial.cpp.
- Plant a breakpoint on the first function call (named B0100()) inside the main() routine at the bottom of the file.
- Run the program from within the debugger.
- The program will halt at the breakpoint you set.
- Step into the function B0100(). You will eventually be returned to the main() subroutine when B0100() returns.
- Step into the next function to continue.
- 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.