O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comments

I talked a little about comments previously, but I am going to explain them in depth now. Comments, as you know, are simply statements you write within your program to explain what you are doing. In a program, comments look like this:

Print "This is a statement.";this is a comment

Make sure you notice the semicolon before the comment. The semicolon is required for every comment; in fact, it is how a comment is identified to the compiler. Comments are used to explain how a part of a program works: it may define what a single statement does, or it may tell what a whole block of statements does. I use almost one comment every other line in my programs; it helps because I often forget what I was trying to do after I finish a program. When ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required