03-24-2023, 06:19 PM
(03-24-2023, 09:51 AM)aurel Wrote: another bad thing is that message loop is created with DO/LOOP
and in C/C++ most used way is with WHILE/WEND
Why is it a bad thing? Just add "DO" in front of "WHILE" statement, and at the bottom write "LOOP" instead of "WEND".
"DO/LOOP" exists to give us a loop that could run once. I have never used "WHILE... WEND", it's unnecessary to me. There was the attempt to make it count with "EXIT WHILE" which arrived too late I think, because many programmers resisted so much using "DO... LOOP" instead.
In fact, "EXIT DO" was the only way to replicate "break;" statement in C, and the excellent code example in the QB64 Wiki, the only way to "_CONTINUE" until of course that QB64-only statement was invented.
The message loop involves "SELECT CASE... END SELECT" also, doesn't it?