Parser problem - C-like and normal comments interfere badly
In ThinBASIC 1.8.8.0, if the text between /* */ contains ' it can produce unexpected results
Hi Eros,
this problem resisted my investigation for 7 days, until now, ho hoo :)
Try to execute this code in ThinBASIC 1.8.8.0:
Uses "Console"
/* Read the kernel's output */
PrintL "A"
/* This comment is okay */
PrintL "B"
WaitKey
The output on the screen should be:
... but you will get only:
Why? Because the text between /* */ contains ' character in word
kernel's. This makes the /* */ matchin confused and in fact has this effect:
Uses "Console"
/* Read the kernel's output */
PrintL "A"
/* This comment is okay */
PrintL "B"
WaitKey
so the Printl "A" gets completely ignored.
This is quite unpleasant, as it can lead to very strange situations.
Petr