Endif underlined in PE6

StigOfTheDump

Senior Member
Why does endif get underlined with a red wavy line in PE6? I can change the color of it in the settings, which identifies it as a KeywordError.

It doesn't seem to matter whether it is on the same line as the if statement separated with a colon or without, or on it's own line. If I remove it I get IF without ENDIF error.

It doesn't show up in code posted to the forum but both the endif statements are underlined. Also the Auto-format tools that I use to correct my inconsistent typing don't show up in the forum.

Code:
[color=Black]SetPause:[/color]
[color=Blue]if [/color][color=Orange]Remote [/color][color=Black]= [/color][color=Red]"A" [/color][color=Blue]then let [/color][color=Purple]b25 [/color][color=Black]= [/color][color=Purple]b25 [/color][color=Black]+ [/color][color=CadetBlue]1[/color]
[color=Blue]pause [/color][color=CadetBlue]1000[/color]
[color=Blue]Serout [/color][color=Purple]c.4[/color][color=Black], [/color][color=Purple]N2400_16[/color][color=Black],[/color][color=Blue]([/color][color=CadetBlue]254[/color][color=Black],[/color][color=CadetBlue]128[/color][color=Black],#[/color][color=Purple]b25[/color][color=Black],[/color][color=Red]"   "[/color][color=Blue])
Endif
if [/color][color=Orange]Remote [/color][color=Black]= [/color][color=Red]"D" [/color][color=Blue]then let [/color][color=Purple]b25 [/color][color=Black]= [/color][color=Purple]b25 [/color][color=Black]- [/color][color=CadetBlue]1[/color]
[color=Blue]pause [/color][color=CadetBlue]1000[/color]
[color=Blue]Serout [/color][color=Purple]c.4[/color][color=Black], [/color][color=Purple]N2400_16[/color][color=Black],[/color][color=Blue]([/color][color=CadetBlue]254[/color][color=Black],[/color][color=CadetBlue]128[/color][color=Black],#[/color][color=Purple]b25[/color][color=Black],[/color][color=Red]"   "[/color][color=Blue])
Endif
return[/color]
Endif.jpg
 

AllyCat

Senior Member
Hi,

Have you declared "Remote" as a Symbol?

However, I can't reproduce the effect either. But then I can't change my colours at all (the Custom Syntax Colour Scheme tick box refuses to "stick") in 6.0.7.0 or 6.0.7.1. :(

Cheers, Alan.
 

Technical

Technical Support
Staff member
The syntax underlining is revised from 6.0.7.0 and so won't occur in the same way

In earlier versions it occurred because your 'if' is badly formatted, you should not really have anything after the 'then' in a multiline if, so reformatting like this will solve the issue. It is is due to the complex rules required to colour distinguish between a single line if and a multiline if...endif.


if Remote = "A" then
let
b25 = b25 + 1
 

Technical

Technical Support
Staff member
But then I can't change my colours at all (the Custom Syntax Colour Scheme tick box refuses to "stick") in 6.0.7.0 or 6.0.7.1. :(
This is a known issue we are working on. You can only apply a colour scheme to the 'legacy' editor at present (File>options>diagnostics), but that will be fixed soon
 

StigOfTheDump

Senior Member
Thanks Technical, fixed in one keystroke! I messed about for ages trying to get rid of it.

@AlleyCat, Yes Remote is a symbol, I also have constants a different color to differentiate between them.
Code:
[color=Blue]symbol [/color][color=Orange]Panpos [/color][color=Black]= [/color][color=MediumVioletRed]w0            [/color]
[color=Blue]Let [/color][color=Orange]Panpos [/color][color=Black]= [/color][color=CadetBlue]1000[/color]
[color=Blue]Symbol [/color][color=Sienna]Pancent [/color][color=Black]= [/color][color=CadetBlue]1000         [/color][color=Green]'1200 cycles(4800 steps) =360 deg[/color]
[color=Blue]Symbol [/color][color=Sienna]Panmax [/color][color=Black]= [/color][color=CadetBlue]1100          [/color]
[color=Blue]Symbol [/color][color=Sienna]Panmin [/color][color=Black]= [/color][color=CadetBlue]900[/color]
[color=Blue]Symbol [/color][color=Orange]Tiltpos [/color][color=Black]= [/color][color=MediumVioletRed]w1[/color]
[color=Blue]Let [/color][color=Orange]Tiltpos [/color][color=Black]= [/color][color=CadetBlue]1000[/color]
[color=Blue]Symbol [/color][color=Sienna]Tiltcent [/color][color=Black]= [/color][color=CadetBlue]1000        [/color][color=Green]'125 cycles(500 steps)=90deg[/color]
[color=Blue]Symbol [/color][color=Sienna]Tiltmax [/color][color=Black]= [/color][color=CadetBlue]1065         [/color]
[color=Blue]Symbol [/color][color=Sienna]Tiltmin [/color][color=Black]= [/color][color=CadetBlue]935[/color]
No I don't have the latest editor, just one digit out. Unfortunately not the 4th digit. Last time I upgraded I seemed to spend hours getting it back to how I had it so I keep putting it off. Suppose I ought to now there has been a major step.

Stig
 

AllyCat

Senior Member
Hi,

Also from me, thanks for your reply Technical.

Last time I upgraded I seemed to spend hours getting it back to how I had it so I keep putting it off. Suppose I ought to now there has been a major step.
Yes, +1. Sadly, I thought that 6.0.7.0 (and then 6.0.7.1) would be "final" for at least a moderate time, but apparently not. BTW I've also "lost" the PE6 icon on my desktop (reverted to the Windows default icon). Happened once before, but I can't now recall where I scratched around in Explorer to find it again.

Cheers, Alan.
 

The bear

Senior Member
@AllyCat,
When running PE6, right click on the icon & pin it to the toolbar (Win7).
Worked for me.
Still can't open Attachments, cannot get PE6 into the 'Open With' box.
Regards, Bear..
 
Top