Positron Compiler Documentation

Line Continuation Character '_'

Positron8 · Revision 4.0.6.5 · PDF page 50

Lines that are too long to display, may be split using the continuation character '_'. This will direct the continuation of a command to the next line. Its use is only permitted after a comma delimiter: -

MyVar = LookUp MyVar2,[1,2,3,_
                       4,5,6,7,8]

or

HRsoutLn "Hello World",_
         Dec MyVar1,_
         Hex MyVar2

Some commands allow a single coma at the end of a line to act as a line continuation as well, so the above commands could be written as:

MyVar1 = LookUp MyVar2,[1,2,3,
                        4,5,6,7,8]

or

HRsoutLn "Hello World",
         Dec MyVar1,
         Hex MyVar2

or

Print At 1, 1, "Hello World",
               Dec MyVar1,
               Hex MyVar2

If a comma is left at the end of a line, but it is not acting as a line continuation, it is classed as a floating comma, and the compiler will give an error message stating it does not know what an item is, with the name of the item it does not recognise as a valid parameter in the error message. It will also give the line where the error is located, as just after the line that had the floating comma.

For example:

Print At 1, 1, "Hello World",
DelayMs 10

Will give the error message: "Item ‘DelayMs’ not found", because it does not recognise "DelayMs" as a valid parameter for the Print command, but it is looking at the next line for a parameter because it has a comma at the end of its line.

View original PDF page 50Open page in PDFOriginal PDF page 50