May 29, 2024, 06:50:08 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Stand-alone REM statement

Started by Logman, August 19, 2015, 08:59:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Logman

August 19, 2015, 08:59:02 AM Last Edit: August 19, 2015, 09:01:56 AM by Logman
The REM statement cannot be used by itself like in IDE version 2.0. Here is example code:


REM ------------------------------
REM Program 1-1: MyProgram
REM
REM ------------------------------


When the REM statement is set by itself, it creates an error message that the "REM statement is undefined". When I place a space after the REM statement, all seems okay and I don't get the error message.

Using a lone ' (apostrophe) on a blank line seems to work as it should. Placing a REM statement on a blank line without a following space should not create an error and prevent the build from completing.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

that's a problem for LarryS and the compiler

I have never used REM in an IWBasic program that I  was writing

I've used
' ------------------------------
' Program 1-1: MyProgram
'
' ------------------------------

and I have used
/* ------------------------------
/ Program 1-1: MyProgram
/
/ ------------------------------*/
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Logman

Thanks Larry.

It is quite disconcerting though. Hope LarryS fixes soon. It did work correctly in IWBasic version 2.x.

I use REM a lot in my books and when using inline assembly language code so readers don't get confused over the semi-colon " ; " used to indicate comments in assembly and the apostrophe " ' " used in IWBasic to mark comments.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

Rock Ridge Farm (Larry)

OK - after many hours of hacking, cutting, pasting, cussing I found the problem is in the api call SetUnhandledExceptionFilter(MyUnhandledFilter);
After much searching I find many references to not using REM on a line alone with no following space or text. Appears to be a known issue since XP days.
I see no immediate way to fix this - I did log an issue with MS10 compiler group.

Short term fix - add the space after the REM.