End of line comments :D

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Locked
smokinbanger
Posts: 204
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

End of line comments :D

Post by smokinbanger »

Quote from the help file:
Any lines appearing in the editor that begin with a period "." are ignored by NeoBook. These are considered comments. For example:

.this is a comment
AlertBox "Greetings" "Hello world."

You can use this feature to add comments to your Action scripts or to temporarily disable commands for debugging purposes.
Well because I don't see it in the help nor could I find any mention of it on the forum here, it seems as though we CAN use "end of line" comments in the action scripts after actions that require parameters! 8)

Examples:
These work (because the comments are after the last expected parameter):

Code: Select all

If "[SaveToDb]" "=" "Checked" .test

Code: Select all

SetVar "[SaveToDb]" "" test
But these do not (because they don't have parameters):

Code: Select all

EndIf .test

Code: Select all

Return .test

Code: Select all

Return test
P.S. Use at your own risk! I haven't tested it on every action command :roll: but I will be 8)
Locked