Language Elements and Reference:xpplrm

Blank spaces and comments Foundation

Blank spaces and other "white space" characters are not translated by the compiler. Their purpose is to delimit the individual language elements and to format the program code making it easily readable by the programmer. The Xbase++ compiler distinguishes four "white space" characters:

Overview of white space characters
White space characters ASCII characters Keyboard
Blank space 32 Space bar
Horizontal tab 9 Tab key
Semicolon 59 Semicolon
Carriage return+line feed 13+10 Enter key

Within a program line the blank spaces and the horizontal tab delimit individual language elements. The enter key terminates the program line and the compiler recognizes the character pair carriage return+line feed as the end of a program line. When a semicolon precedes the carriage return+line feed, it acts as a line continuation character allowing a single continuous line of code to be written across several program lines.

Program code must contain explanatory text in order to make it understandable to other programmers. Like blank spaces, comments are not compiled as part of the program code. The Xbase++ compiler recognizes five different syntaxes for comments. Of these only three are recommended. Two other comment syntaxes exist only for compatibility reasons and should no longer be used in Xbase++ programs. The following three syntaxes are preferred for comments:

/* 
   This is a 
   multiple line comment 
*/ 
* This is a single line comment 
x = y + 1        // This is an inline comment 
/* x = y + 1     // This line is entirely commented */ 

The following two syntaxes are also still supported:

NOTE This is a single line comment 
x = y + 1     && This is an inline comment 

These last two ways of identifying comments in Xbase++ programs are historically derived and serve only to preserve compatibility. They should not be used in rewritten or newly written programs.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.