josborne
04-02-2007, 12:37 PM
I was going to require that my students document their code but I could not find a mechanism for adding comments, e.g., in Phrogram "// This is a comment".
How do I add comments to the code?
There is a comment tile below the method editor at the far end. See image below.
DickBaldwin
04-02-2007, 03:19 PM
TIP: In case you are going to also require your students to turn in printed source code generated using the item on the File menu that reads something like "Export code for printing," be careful of the length of the comments. Otherwise, they will wrap in a very ugly way. Depending on the indentation level of the comment, they need to be fairly short to very short in order to avoid wrapping in the HTML output created by this menu option.
Another TIP: In case your students are going to go into a Java or C++ programming environment after they master Alice, and if you are going to have them generate source code as described above, you may want to consider having them select preferences on the edit menu, and then select the option for Java format in color, or words to that effect. The printed output still isn't pure Java, but it is much closer than the default Alice format.
Dick Baldwin