I remember in version 3 the file had all kinds of info next to various things with // and such. Is it possible to do that in the new menu? I just need to have info there for my memory of what I did with certain things and why....not sure how to do that or if it's possible. Happy New Year, everyone.
Ruth
inserting explanation type info in file
Hi Ruth and Maz,
Just to add... the explanations are held in "comments." Most programming/scripting languages offer the ability to add comments to the code, for just the reason you mention (remembering later what you did, or helping others to understand what you did). Since the menu code is javascript, you can use javascript's commenting scheme. In javascript, there are two methods of adding comments.
(1) If you want to add a comment on a single line in the .js file, you can use the // method, like so:
Everything to the right of the //, on that single line of code is ignored by the browser when it processes that line of js code.
(2) If you want to add a "block" of comments, i.e., more than a single line, you have two choices. Some people would add a // to the start of each line. Alternatively, you could use the /* put your comments here */ construct, like so:
Everything between the opening /* and the closing */ is ignored, kind of like using <!-- and --> in html code.
Cheers,
Kevin
Just to add... the explanations are held in "comments." Most programming/scripting languages offer the ability to add comments to the code, for just the reason you mention (remembering later what you did, or helping others to understand what you did). Since the menu code is javascript, you can use javascript's commenting scheme. In javascript, there are two methods of adding comments.
(1) If you want to add a comment on a single line in the .js file, you can use the // method, like so:
Code: Select all
var inkeeper9 = "Ruth"; // innkeeper9 is Ruth's on-line name
(2) If you want to add a "block" of comments, i.e., more than a single line, you have two choices. Some people would add a // to the start of each line. Alternatively, you could use the /* put your comments here */ construct, like so:
Code: Select all
/*
Ruth and Maz both participate quite a lot on the Milonic forums,
asking questions occasionally, and also often answering other
people's questions to "give back" to this very nice on-line
community.
*/
var inkeeper9 = "Ruth"; // innkeeper9 is Ruth's on-line name
var maz = "Maz"; // Don't know what Maz's real name is
Cheers,
Kevin