News:

;) This forum is the property of Proton software developers

Main Menu

Positron Studio Update

Started by JohnB, Jul 29, 2021, 08:11 AM

Previous topic - Next topic

JohnB

There is a new version 2.0.2.11 of Positron Studio published.
New:
Added Save To HTML to the Files menu.  This will save a file with the application's filename with the extension '.htm'
Added Ctrl+E to the Keyboard Shortcuts. This will copy a HTML formatted version of the selected text to the clipboard.
If a Project is open, the current page is in the project and that project successfully compiled the Assembler tab will be visible even on include files.
Fixed:
Find and Copy now work on the assembler tab.
Quick Search has been improved – it will now wrapround, cursor always appears at the start of the search item, click away from line to cancel quick search.
If enabled, Auto-Backup now creates a backup and reports it in the messages window after compiling.
Application hang when closing some files.
JohnB

John Lawton

Good work John, keep it up!!

John Drew

Thanks John, I look forward to trying it out.
John

JohnB

I have now released Positron Studio 2.0.2.12.

Major change is addition of Code block lines and symbols.  Looping and Conditional functions can now be bracketed to indicate matching Start..End statements and Returns, Continue and Break statements will be highlighted with a symbol indicating change in program flow.

Other changes include new Keyboard short cut to toggle commenting and selection background colour can now be changed. 
Plus other minor fixes.

Please visit ProtonStudio.co.uk to download.
JohnB

Pepe

In W7 give errorerror.jpg

JohnB

You will have to give me more information than that.  I have entered exactly the same code as on your screen but no access violation.

Take me through exactly how to reproduce it and I will resolve it. 

How did you enter it how did you create it in the first place?
was it an existing file which you just opened, was it pasted into a new page? 

There is no point in reporting these issues if you don't provide the actions which lead up to the problem.
JohnB

Pepe

#6
When I open the t.bas file as shown in the video it gives error in W7 32bitserror.zip
Also I am only showing you what produces the error because I spent a long time to be able to identify it within my program of more than 2000 lines because it did not allow me to do anything and I had to close the application with the task manager.
The version 2.0.2.3 works well as shown in the picture of my program.

JohnB

#7
Thanks.  That is really odd, it only fails with a Win 32 build and is fine with a 64bit build.
Turn off Code Block Lines and you will not get the failure.  It is because I had not catered for Do...Loop While.
I had forgotten both Loop Until and Loop While are both valid commands.
I'll issue an update shortly. 

Looking at it, this is going to take me a bit longer to resolve, I have pulled the release from the website and will re-instate it what I have coded the necessary change.
JohnB

Pepe

Thanks for the temporary solution

JohnB

Hopefully I have just uploaded a more permanent solution. 
It has been a b*gg*r to sort out but I think it is now OK.

As soon I saw your reply I removed the link to the download so hopefully not too many have downloaded yet.
I have uploaded a new version and enabled the link.  Please let me know if any other problems arise.
JohnB

Pepe

Disabling Code Block Lines works correctly but if it is enabled in version 2.0.2.11 it keeps giving the same error

JohnB

I have spotted an issue with code folding which means offsets horizontally the bracket lines by about half a character.  This is associated with code folding.  Simple workaround is to toggle code folding on and off in Tools, Options after which the lines will realign correctly.  A fix for this will be the next release, no date yet.
JohnB

kcsl

#12
John,
I've been using Proton Studio and noticed a couple of little niggles.

It's falsely reporting some variables as not being used when they are.
All 3 variables mentioned are used; 2 x on the highlighted line and 1 variable, 7 lines from bottom of the listing.

I had a syntax error (missing End If) which I corrected, but it's still highlighting (red squiggle) where the original error was detected. A re-compile doesn't clear it, so I saved my work, restarted Studio and the squiggle is still there. You can clearly see that the code compiles without error> I've deleted a lot of code so everything would fit onto one screen and recompiled several times but still the squiggle. It's the IF statement directly below the highlighted line.

I've also attached the source code (renamed to junk1.txt).
This code was originally written in the original Proton IDE.

(Edit: ignore highlighted line comment... its the SHin line directly below the MainLoop: label)

Regards, Joe

There's no room for optimism in software or hardware engineering.

JohnB

The reason it is failing the End If.  The correct syntax is EndIf although the compiler does accept the former syntax.  Remove the spaces between the End and the If and you should find it is OK.

I will look at emulating the compiler and accept the alternative form.
JohnB

kcsl

Thanks John,

That fixed the highlighting, but the variable not in use warning is still being thrown.


Regards,
Joe
There's no room for optimism in software or hardware engineering.

JohnB

The reason its detecting these Vars as being unused is because they are never referenced except by VarName.0
If the whole byte had ever been used the warning would not have appeared. I will update the code to accommodate such situations.
JohnB

Stephen Moss

Quote from: kcsl on Oct 24, 2021, 02:00 PMThanks John,

That fixed the highlighting, but the variable not in use warning is still being thrown.
Makes sense to me, technically someone could argue that they are "in use" as they are appear to be used for storing the incoming SHin data, and so do not need ot be set to an initial value, but it is useful to have a warning that a variable has not been assigned a value before use.

VB has a similar warning, it underlines a variable that is being used before being assigned a value, it should be easy to get rid of the warnings in code by simply using...
Dim bytByte1 as Byte = 0 instead of...
Dim bytByte1 as Byte

From the posted image it appears the program compiled successfully anyway, so having the warnings there as a reminder of a potential problem is surely a good thing, if you know it is not a problem (as in this case with them holding received data) then you know you can ignore those warnings.
Perhaps always assigning an initial value to a variable at its creation is generally a better belt and braces coding method to do become accustomed to using.

John Lawton

Quote from: JohnB on Oct 23, 2021, 05:29 PMThe reason it is failing the End If.  The correct syntax is EndIf although the compiler does accept the former syntax.  Remove the spaces between the End and the If and you should find it is OK.

I will look at emulating the compiler and accept the alternative form.

Hi John,
the same point applies to "End Select" which should be "EndSelect" although as with "End If" the compiler accepts either syntax.

John

John Lawton

Quote from: Stephen Moss on Oct 25, 2021, 09:19 AMVB has a similar warning, it underlines a variable that is being used before being assigned a value, it should be easy to get rid of the warnings in code by simply using...
Dim bytByte1 as Byte = 0 instead of...
Dim bytByte1 as Byte
 
Perhaps always assigning an initial value to a variable at its creation is generally a better belt and braces coding method to do become accustomed to using.

All good comments, but in this code Positron Studio still doesn't recognise that the variable TempOutputByte has been used.
 
TempOutputByte.0 = OutputBit1
I think it is the bit assignment that fools it.

kcsl

So doing a quick test, Dim x as Byte = 0 doesn't prevent the "variable not used warning", which I think is correct as initialising a variable at declaration time doesn't constitute using it.

Quoteso having the warnings there as a reminder of a potential problem is surely a good thing
I would agree, and the warning description would need to reflect that situation.

QuotePerhaps always assigning an initial value to a variable at its creation is generally a better belt and braces coding method to do become accustomed to using.
Possibly, in the correct situation, but it costs you additional code space and is a waste if it's not needed.

There's no room for optimism in software or hardware engineering.