SELECT CASE Kbd$
CASE "A"
'This expression-list is recognised
CASE "B" TO "Z"
'This expression-list is ignored
END SELECT
Is this a documentation error or am I doing something wrong?
I just started migrating a number of applications from Quickbasic to FREEBasic.
Range ('TO') in SELECT CASE ignored.
Your example works fine for me.
Please understand that the documentation is fan-made, the only really "official" parts of it are the ones Lillo made himself for the graphics functions he wrote. The rest is sort of a work in progress.
However, your finding errors, typos and missing info is very much appreciated.
Please understand that the documentation is fan-made, the only really "official" parts of it are the ones Lillo made himself for the graphics functions he wrote. The rest is sort of a work in progress.
However, your finding errors, typos and missing info is very much appreciated.
My representation of a part of my program wasn't fully correct.
This works fine:
TmpText$="G"
SELECT CASE TmpText$
CASE CHR$(32) TO CHR$(122)
PRINT TmpText$;" recognised!"
CASE ELSE
PRINT TmpText$;" not recognised!"
END SELECT
This doesn't work (Works well in QuickBasic)
TmpText$="G"
SELECT CASE TmpText$
CASE CHR$(32) TO CHR$(254)
PRINT TmpText$;" recognised!"
CASE ELSE
PRINT TmpText$;" not recognised!"
END SELECT
So whether or not the TO-clause works depends on the range?!?!
This works fine:
TmpText$="G"
SELECT CASE TmpText$
CASE CHR$(32) TO CHR$(122)
PRINT TmpText$;" recognised!"
CASE ELSE
PRINT TmpText$;" not recognised!"
END SELECT
This doesn't work (Works well in QuickBasic)
TmpText$="G"
SELECT CASE TmpText$
CASE CHR$(32) TO CHR$(254)
PRINT TmpText$;" recognised!"
CASE ELSE
PRINT TmpText$;" not recognised!"
END SELECT
So whether or not the TO-clause works depends on the range?!?!