Win32 Troubleshooting:Unfair errors
The XBasic PDE has the problem to get lost in it's track upon it's own variable types and addresses.
This can cause very strange errors that are not fair... one example:
SELECT CASE A$
001 CASE "Hello"
002 CASE "Noway"
Error mentioned for 001 and 002 is "Type Mismatch"
If A$ is a string and "Hello" is a literal then A$ can be "Hello" can't it?
So this is pretty unlogical.
It's not because XBasic has become crazy but it's address-tables to the variable have.
And it is not easy to track as this problem has been around there for quite a long time.
The only quick solution to solve that problem is to go to the dot-command line in the PDE and supply the code ".fm t" [enter], followed by ".fm p" [enter].
This sequence is the same as selecting the file menu, select the "mode" option and then click the "text" button in the dialogue, followed by again clicking the file menu, option "mode" and then clicking the "program" button in the dialogue.
What XBasic does is changing the editing mode, going to text-mode, xbasic dumps all source-code into the textarea and clears all pointers to functions, variables etc.
By then changing everything back to program mode, XBasic rebuilds the addresstables and pointers to functions so XBasic starts with a clean slate.