Introduction to PowerBuilder

HomePrevious Lesson: Functions
Next Lesson: Line Continuation Character

Comments

It is always a good idea to have comments to the code. There is nothing more frustrating than trying to debug someone else's code (or even your own old code!) with no comments to guide.

PowerBuilder uses the same (two) methods as C++ to designate comments:

// This is a comment which uses the single
// line comment style. We have to put the comment 
// characters at the beginning of each line.
/* This is the comment style which is used to 
   comment out a large block of text. We don't have to 
   put the comment character at the beginning of each line,
   only at the beginning and the end of the comment.*/

The Comment and Uncomment options on the Painterbar allow you to quickly comment and uncomment lines of code. This is helpful when debugging a script, to comment/uncomment lines in order to find errors.
HomePrevious Lesson: Functions
Next Lesson: Line Continuation Character