Altering a Large Integer Value on an LCD with only 3 buttons

Started by Peter Truman, May 12, 2023, 04:58 AM

Previous topic - Next topic

Peter Truman

Hi everyone

I'm just moving over to Positron from proton and spotted Les's Altering a Large Integer Value on an LCD with only 3 buttons.

Having looked through this it seems like it would not only be a useful routine to have available (I wrote my own routine to do something similar way back - but nowhere need as efficient as this)

So my setup is

Positron Studio build 5
Positron Compiler 4.0.3 build 3

I've copied the *.bas code directly from the 'Positron 8 -' file

Tried to compile and have been hit with a host of errors - few of which make sense to me (best way to learn really)

A sample of the errors are attached

Starting from the first error - points to this line

    Dim Global_lValue As Long  ' Holds the 24-bit value that has been altered
"Variable type declaration missing or incorrect!"

Looking at the manual I can see nothing wrong with 'Dim Global_lValue as Long?' - I tried rewriting it - even trying a different name. I've dim'ed a million variables over the years (but not using the 'long' type) - so I can only assume this is the issue?

Given the 30 or so errors I get trying to compile this - I'm wondering if I have missed something really fundamental

So - not a simple intro to Positron after all  ;D

If someone can point me in the right direction, I'd appreciate it.

Thanks in advance


John Lawton

Stephen Moss

What series device was the code written for compared to the device you are using. Perhaps the device you are using cannot handle Long hence it is being flagged as a problem, see the note of page 21 of the 8 bit manual.


I've just downloaded the files from my web site and compiled them with no problems.

Make sure you are actually using the Positron8 compiler and not the original Proton compiler, because the 24-bit Long variable did not exist with the Proton compiler and will cause lots of errors.

In the text I send with the compiler download link, it has the section:

--- Note ---
It is sometimes better to uninstall the compilers that are currently on your machine first. Then install the new versions, especially if the previous compiler version is Proton and not Positron..

To make sure you are using the Positron compiler, look at the assembler code's header text from a compiled program. It will show the compiler type and version number and your ID for the software protection. Something such as:

;  /\\\\\\\\\
;  /\\\///////\\\
;  \/\\\    \/\\\                                                /\\\          /\\\
;  \/\\\\\\\\\\\/        /\\\\\    /\\\\\\\\\\    /\\\\\\\\  /\\\\\\\\\\\  /\\\\\\\\\\\  /\\\\\\\\\
;    \/\\\//////\\\      /\\\///\\\  \/\\\//////    /\\\/////\\\ \////\\\////  \////\\\////  \////////\\\
;    \/\\\    \//\\\    /\\\  \//\\\ \/\\\\\\\\\\  /\\\\\\\\\\\    \/\\\        \/\\\        /\\\\\\\\\\
;      \/\\\    \//\\\  \//\\\  /\\\  \////////\\\ \//\\///////      \/\\\ /\\    \/\\\ /\\  /\\\/////\\\
;      \/\\\      \//\\\  \///\\\\\/    /\\\\\\\\\\  \//\\\\\\\\\\    \//\\\\\      \//\\\\\  \//\\\\\\\\/\\
;        \///        \///    \/////    \//////////    \//////////      \/////        \/////    \////////\//
;                                  Let's find out together what makes a PIC Tick!
; Code Produced by the Positron8 Compiler. Version
; Created and Written by Les Johnson.
; Compiler version for Les

The Positron compiler places the new files in the original ProtonIDE folder to make things more familiar to users, but the file names are changed, and the new icon on the desktop is named "Positron Compilers"

If you are using John's Studio IDE or Norm's FineLine IDE, make sure they are actually pointing to the Positron compiler and not the original Proton compiler because file names have changed, so they are probably still calling the Proton compiler.

If you are not seeing the Positron compilers from the IDEs, and to make sure everything is as it should be in the O/S. Uninstall the Positron compiler from the control panel, then uninstall the Proton compiler. Then remove the folder "C:\Program Files (x86)\ProtonIDE". This will remove all the files for the actual compilers.

Then re-install the Positron compilers.

Peter Truman

Yep - that seems to have been it.

I separated the Proton and Positron install locations - cleaned everything up and started again. All seems to compile fine now.

Thanks for your help - I just need to work through the code now and see how things work.

Many thanks