News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Print command error

Started by Samir sayyed, Jul 03, 2022, 07:39 AM

Previous topic - Next topic

Samir sayyed

Hi I am recently new purchase posistron 4.0.1.9 as there is a error occurred while using with old programing (proton3.7.5.5) working well but while in using new software 4.0.1.9 there is occurring error
Compilling. Here I attached image


top204

#1
Make sure the Print commands, and other commands, do not have commas at the end of the lines, because the compiler now uses them as line continuation as well in "some" commands. So if it sees a comma with nothing after it, it will look at the next line for a modifier or variable, and if it is actually a command, it will give similar error messages because it does not recognise them as compatible parameters.

The earlier compilers, mistakenly, ignored commas at the end of the line, but I have tightened the syntax checking in the Positron compilers so they will give errors where the earlier compilers did not.

For example, the two lines:

Print "hello world",
DelayMS 10


Will give the error message:

"Item 'DelayMs' not found!"

And the line where the DelayMs command is in the code will be highlighted. This is because DelayMs is not a recognised parameter for the Print command, but because it has a comma hanging at the end of the line, it is looking at the next line for more parameters.

I am currently going through the compilers and making an empty comma a line continuation on all the commands, as well as the ",_" characters.

Samir sayyed

Dear top204 please test my test file

Pepe

#3
As Les said remove the commas at the end of the print

Samir sayyed

#4
Many many thanks @Pepe @top204
Problem solve 😌 there
It's my fualt I am add comma