Comments
Medal of honor script allows // as an inline comment, it can be used on any line and is delimited by the new line character (return).
A comment is text that the compiler ignores but that is useful for programmers. Comments are normally used to annotate code for future reference. The compiler treats them as white space. You can use comments in testing to make certain lines of code inactive.
A comment is written in one of the following ways:
The /* (slash, asterisk) characters, followed by any sequence of characters (including new lines), followed by the */ characters. This syntax is the same as ANSI C.
The // (two slashes) characters, followed by any sequence of characters. A new line not immediately preceded by a backslash terminates this form of comment. Therefore, it is commonly called a single-line comment.
The comment characters (/*, */, and //) have no special meaning within a character constant, string literal, or comment. Comments using the first syntax, therefore, cannot be nested. Consider this example:
/* style */
-------------------
/*This whole section of text without the comment would break the script causing it not to load!
luckily the user has commented it out! When the compiler ( the mohaa script engine) reads it
it will load properly. My mod simply tells the engine when and where to load it and for what reason.
*/
main:
local.variable = 9
// the local.variable becomes 9
end
------------------
And a example of // style
--------------------
main:
local.variable = 9
// the local.variable becomes 9
end
----------------
The other form of comments
For comments, requests or suggestion please contact me