00001 #include "MusimatTutorial.h" 00002 MusimatTutorialSection(B0128) { 00003 Print("*** B.1.28 Comments ***"); 00004 /***************************************************************************** 00005 00006 B.1.28 Comments 00007 00008 We've already been using comments, but here's a little more about them. 00009 00010 It is always helpful to readers if programmers insert comments into their programs. In Musimat, 00011 any text beginning with two slashes // out to the end of the line is commentary. For example: 00012 *****************************************************************************/ 00013 00014 Real a = 1, b = 2; 00015 Real x = a + b; // this text is commentary 00016 00017 /***************************************************************************** 00018 Sometimes it's useful to be able to put a comment anywhere, even in the middle of an expres- 00019 sion. All commentary between these delimiters is ignored. 00020 *****************************************************************************/ 00021 00022 x = a /* this commentary is ignored by musimat */ + b; 00023 00024 /***************************************************************************** 00025 When the expression is evaluated, all commentary is ignored, so the resulting expression is x = 00026 a + b;. Commentary between comment delimeters can extend over multiple lines of text, as necessary. 00027 *****************************************************************************/ 00028 } 00029 00031 /* $Revision: 1.2 $ $Date: 2006/09/05 06:32:26 $ $Author: dgl $ $Name: $ $Id: B0128.cpp,v 1.2 2006/09/05 06:32:26 dgl Exp $ */ 00032 // The Musimat Tutorial © 2006 Gareth Loy 00033 // Derived from Chapter 9 and Appendix B of "Musimathics Vol. 1" © 2006 Gareth Loy 00034 // and published exclusively by The MIT Press. 00035 // This program is released WITHOUT ANY WARRANTY; without even the implied 00036 // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00037 // For information on usage and redistribution, and for a DISCLAIMER OF ALL 00038 // WARRANTIES, see the file, "LICENSE.txt," in this distribution. 00039 // "Musimathics" is available here: http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10916 00040 // Gareth Loy's Musimathics website: http://www.musimathics.com/ 00041 // The Musimat website: http://www.musimat.com/ 00042 // This program is released under the terms of the GNU General Public License 00043 // available here: http://www.gnu.org/licenses/gpl.txt 00044