News:

;) This forum is the property of Proton software developers

Main Menu

Assembler window and variable not found

Started by See_Mos, Feb 03, 2022, 10:56 AM

Previous topic - Next topic

See_Mos

Hi John,

Using 2.0.2.14 and W7

I just tried to compile some old code which uses HBUS commands.

I get two warnings, one is obvious and is about legacy HBUS commands. The other is MCP_PortA variable declared but never used, even though it is used three times in the main code and the code compiles OK.

After compilation I cannot find the assembler tab

See_Mos

I looked at the View menu and turned on Code Explorer.  Now I have Code, Fuses, Assembler and HEX tabs where I only had the code tab previously.  Now clearing or setting Code Explorer option does not change anything.

See_Mos

and as I proceed with alterations this commented block and the following variable show errors.  Again Index is used in the main code.

DIM errors.JPG

Yasin

(* and
*) may not be fully understood. Can you try using the sign?
'

JohnB

@See_MosOS . Yasin may well have a point, I will look into that on my things to do.
After compilation, if there are no errors you should see the asm and hex tab.  I suspect it is being suppressed because there are warnings.  I will correct this next release.
JohnB

Stephen Moss

Quote from: See_Mos on Feb 03, 2022, 02:40 PMI proceed with alterations this commented block and the following variable show errors.
In the General Tab of the Option select "Block Comment Line by Line" instead of "Use Block comment Characters", that will use the normal apostrophe character to comment out the lines and see if the issue persists.
If the problem goes away that would suggest that the problem may lie with just with the block comment characters, otherwise it it may indicate a wider issue.   

See_Mos

Thanks Stephen, that works and I prefer the appearance of individually commented lines.

Meanwhile, I am still getting the 'variable .... is declared but never used'  I reduced the code to the following.  If I comment out the line Index = %10101010 and I get the warning.

Dim Index As Byte
Main:
Index = %10101010
While 1 = 1
Inc Index
Delayms 200
Wend

John Lawton


See_Mos

I don't think so, I have used it in a few codes without errors.  As mentioned previously the warning has happened with other variable names

top204

"Index" is not a compiler reserved name. If a reserved name is used with the Dim or Symbol directives, the compiler will give an error message stating that it is a protected word of the assembler or compiler.


trastikata

I too get from time to time this type of "error" in Proton IDE. What I've noticed is it appears when there are included files in the program, but it has nothing to do with the variables in them.

JohnB

@See_Mos Looking into your issue at post #7 there is nothing special about Index, the issue applies to any variable.

I haven't got to the bottom of this yet, it seems something isn't being cleared down properly.
I have been particularly busy in domestic jobs but when our kitchen install is finished I hope to have more time to delve deeper into this.


JohnB

JohnB

@See_Mos I have found the issue, would you like to try it out before I release it?
Send me a PM with an email address and I will send you a link to the new version.
It resolves a 6 issues.
JohnB