| Home | Previous Lesson: Line Continuation Character Next Lesson: Scripting Structures |
You can write more than one statement in a single line by separating them with a semicolon:
SQLCA.DBMS = "Sybase"; SQLCA.ServerName = "SQLServer1"
Generally, it isn't a good idea to put more than one statement on a single line, simply because it makes the code difficult to read. It makes debugging complex, since any debug error message refers to a line number and doesn't specify the statement. If there are multiple statements on a line, you would still have to determine which statement is causing the error.
To overcome this problem, put each statement on separate lines. There is no difference in efficiency from PowerBuilder standpoint. Moreover, it has an added advantage of improving the readability of the code, while easing maintenance.
| Home | Previous Lesson: Line Continuation Character Next Lesson: Scripting Structures |