Introduction to PowerBuilder

HomePrevious Lesson: Comments
Next Lesson: Compound Statements

Line Continuation Character

PowerBuilder, with the help of the special ampersand character (&), allows you to split commands that don't fit in a line. It should be the last character of the line and note that a variable name can't be split:
MessageBox ( "Save","Do you want to save" + &
           "changes? ", Question!, OkCancel!, 2 )

When using SQL statements in PowerScript, continuation character is not needed. By default, everything after a SQL keyword is considered a single line until a semicolon is encountered. For this reason, it is vitally important that a semicolon is added at the end of the SQL statements. For example:
SELECT product_description INTO :lproduct_description
   FROM product_master
   WHERE product_no = :a_product_no;
HomePrevious Lesson: Comments
Next Lesson: Compound Statements