Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4787

Line concatenation

$
0
0
This is ok in PBP v2.60c.
Code:

IF PORTB.0 = 0 THEN
 LCDOUT  $FE,$C0,"Row 1, Column 4"
ENDIF

Why is this not accepted?
Code:

IF PORTB.0 = 0 THEN : LCDOUT  $FE,$C0,"Row 1, Column 4" : ENDIF
Quote:

ERROR Line 50: Bad expression.
ERROR Line 50: Bad expression or missing THEN.
Yet the manual says I should be able to do it.
Quote:

2.18 Line-Concatenation ( : )
Multiple commands may be written on a single line using colon characters to tell PBP where to insert a "virtual" line break. This can pack more code into less space, but it generally makes the program more difficult to read.
x = x + 2 : HIGH led : LOW cs
Unless IF statements are the exception to the rule?

Robert

Viewing all articles
Browse latest Browse all 4787

Trending Articles