Now that we've looked over a particular Oolong program, let's look at Oolong programs in general. One important part of an Oolong program is a comment. Comments always begin with a semicolon (;) and end at the end of the line. There are no directives or other funny stuff hidden inside the comment; you may put anything you like in them. They are completely ignored, and they don't have any effect on the generated .class file. For example, ; This is a comment Throughout this book, we use the convention of a double semicolon to introduce a comment that documents omitted code. For example, ; This is a comment describing the main method .method main([Ljava/lang/String;)V ;; Code is omitted .end method The first comment is used to actually document the method; you can think of it as a comment that would actually be included if you were really writing this program. The second comment indicates that there should be code there, but for the purposes of making the book readable we have chosen to omit it. It is used in the book where actual code would distract from the point of the example. Double semicolon comments have no particular meaning to the Oolong assembler and are ignored just like any other comment. |