PowerBASIC Users Meeting Point
END IS... - Printable Version

+- PowerBASIC Users Meeting Point (https://pump.richheimer.de)
+-- Forum: User to User Discussions (https://pump.richheimer.de/forumdisplay.php?fid=3)
+--- Forum: Programming (https://pump.richheimer.de/forumdisplay.php?fid=7)
+--- Thread: END IS... (/showthread.php?tid=160)



END IS... - Borje Hagsten - 20.11.2026

You know the feeling - I had this large code in a function, lots of Select Case and IF/END IF's nexted in each other and I was 100% sure I had done everything according to the book, but it didn't compile. "Select expected", pointing at a final End Select at bottom of the function.

I checked everything - All IF's had a matching END IF and all Select cases had a matching End Select. Checked all For/Next loops, each line of code and all looked ok, but still "Select expected"from the compiler. Brain freeze - I had to leave it at that and go for a walk, eat some dinner and when I got back, I carefully read through each line of code - and finally found the faulty line - I had written "END IS" in the middle of everything, but the compiler of course went on reading the code until the end of it before it reported the error. I know that's the way it works.

Stupid error - changed IS to IF and al is well again. Beginning to wonder if it was a Freudian Slip from my fingers and the END really IS here for my brain..  Cool


RE: END IS... - Johan Klassen - 20.11.2026

Hi Borje
to this day I have problems with nested If then Else If constructs, it's especially troublesome in Pascal