Comments
This page is recommended for cleanup.

Comments in Brutus2D are notes left by the game programmer to remind himself of what his code does and to help other people who make look at the code know what it does. A comment begins with an apostrophe ( ' ). When Brutus2D finds an apostrophe, it ignores the rest of the line.

' this is a comment

Related Pages

Backlinks

These pages link back to this page. You may find them helpful.

Discuss

Cleanup
hartnellhartnell 1215196831|%e %b %Y, %H:%M %Z|agohover

Is a page needed for comments? While it would be easy to link to from the forum, how could it be included in a general syntax page?

— Hartnell

unfold Cleanup by hartnellhartnell, 1215196831|%e %b %Y, %H:%M %Z|agohover
Re: Cleanup
u9u9 1215373537|%e %b %Y, %H:%M %Z|agohover

Short answer, yes.

how could it be included in a general syntax page?

I don't understand. But here's what i think: If we want to tell about commenting code, which is fine, it should tell

  • how to write comments in that particular language (E.g. ' or Rem or // etc.)
  • what to write and not to write
    • E.g. you don't write what the code does, i.e. explaining syntax, but rather semantic, concept etc. E.g. if x < 0 then x = 640 should be commented ' Wrap space-ship around the screen border and not something like ' set x to 640 if it is less then 0 as that is obvious to anyone who can read code.
  • description of self commenting code
    • Self commenting code is mostly about correct use of indentation, spacing, both vertical and horizontal, naming conventions (e.g. Hungarian notation, though i am absolutely not a fan, just an example) and stuff like that. Basically how much you can inform the reader of what the code does without actually writing any comments. Self explaining code.
unfold Re: Cleanup by u9u9, 1215373537|%e %b %Y, %H:%M %Z|agohover
Re: Cleanup
hartnellhartnell 1215398452|%e %b %Y, %H:%M %Z|agohover

If there's so much to add, then we need to keep the page.

I don't think that either VBScript or JScript uses REM. :)

And this brings up the issue of separating core language docs (VBScript or JScript). This needs much discussion.

— Hartnell

unfold Re: Cleanup by hartnellhartnell, 1215398452|%e %b %Y, %H:%M %Z|agohover
Re: Cleanup
u9u9 1215415280|%e %b %Y, %H:%M %Z|agohover

VBScript or JScript

We need to keep vbscript as this is what we currently have, and this is what most people use. What i am thinking is that we can at some point start making the tutorials in jscript also with tabview for the differences, and that way slowly introduce jscript. Then we could look into how to do the documentation. I'm not sure if we should have two separate doc-trees or we should combine them.

unfold Re: Cleanup by u9u9, 1215415280|%e %b %Y, %H:%M %Z|agohover
Add a new comment
page tags: comment remark
page_revision: 3, last_edited: 1215196422|%e %b %Y, %H:%M %Z (%O ago)