HTBasic supports line numbers for backwards compatibility with HP Basic. Although line numbers can be referenced in statements like GOTO, GOSUB, or RESTORE for DATA, the use of line labels is preferred and results in more structured programming. Plus, well chosen names for line labels helps to document your program. Note that a line label cannot be the only thing on a line; it must precede a syntactically valid statement, even if it is just a comment tail "!". Also, line numbers are used as edit line references and for reporting the location of program line errors. The maximum number of characters allowed in a program line is 255, which means it may be necessary to scroll to see the end of a line.
Comments
Each program line can contain an optional comment either as the only thing on the line or at the end of a line of code to document it.
Standalone comments can start with either REM or an exclamation mark "!". Comments at the end of a line can only use the exclamation mark !, which is then referred to as a comment "tail".