Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Linemarks in Basic+

Whenever I'm debugging old Basic+ code, there are times when the current line that I'm on is sometimes off by 1 or 2 lines (The worst I've seen it was 8 lines). I finally just noticed a variable in some of these programs written as "LINEMARK" not being initialized to anything by our previous programmer. I'm not sure what the goal of a LINEMARK is since I'm still somewhat new to this environment and could use some help understanding what this means...and if its related to my issue regarding debugging lines being offset.

Comments

  • When you're debugging a routine that is off, is that the routine you added a "debug" to, or is it a routine that you've stepped into after starting the debug in a calling routine?
    The lines can be off when debugging if the source code and object code are not compatible. In other words, you're using a system where the sysprocexe was deployed to, but not the sysproc itself.

    What happens in that case, is the debugger is stepping line by line through the object code but you're seeing the corresponding line of the source. If you recompile the source, the debugger will line up again but you'll also lose whatever the object code was, which was likely the more recent version of the code.

    Of course it could be the other way around as well where the deployment had source but missed the exe so recompiling the source would be the correct thing to do.
  • We actually had to do a little research into LINEMARK. As far as we can tell, it simply inserts a carriage-return line-feed (CRLF) into the code. This is why it throws of the debugger. LINEMARK seems to be entirely deprecated at this point and there is no harm in removing it from your BASIC+ code.
  • Thank you guys for looking into this for me. It was a routine where I inserted a debug, that now makes sense since I was dealing with code in SYSPROC and in SOURCE that is used by AREV. I'll also definitely remove those LINEMARK values going forward, they've been nothing other than an inconvenience for me.
Sign In or Register to comment.