edf
New Member
Posts: 3
|
Post by edf on Dec 1, 2022 20:56:45 GMT
I am having problems compiling old production code that uses <LF><CR> (I.E. 10d13d or 12o15o) as end of lines to indicate the next line is a continuation of the current line.
Is this a non-compatibility?
EdF
|
|
|
Post by bplus on Dec 2, 2022 6:39:36 GMT
Sure Chr$(13) + Chr$(10) no problems with that. Not sure what QB IBM basic is. Do you mean MicroSoft QB or IBM other Basic names
Wiki
|
|
edf
New Member
Posts: 3
|
Post by edf on Jan 3, 2023 5:46:29 GMT
This has been a legal code input syntax in gwbasic, IBMV2 basis MSBasic and QB
Using <LFCR> (As 2 keystrokes not as the literal "<LFCR>") indicated that the code line continues on the next line. I.E. the input code that appears on the "next line" is a continuation of the last line and continues until the appearance of the standard <crlf> end-of-line.
EdF
|
|
|
Post by bplus on Jan 3, 2023 12:40:47 GMT
To be perfectly clear neither <LFCR> nor <LF> are valid variables nor keywords for QB, not ever.
Best you can do is Dim Shared LFCR as String LFCR = Chr$(13) + Chr$(10)
But Chr$(10) works fine to start a new PRINT line, eg:
Print "Hello" + Chr$(10) + "World" + Chr$(10) + Chr$(10) + "OK?" + Chr$(10) + ";-))"
|
|
dualbrain
Junior Member
The only bug free code is code that is no longer used.
Posts: 51
|
Post by dualbrain on Jan 25, 2023 15:29:52 GMT
This has been a legal code input syntax in gwbasic, IBMV2 basis MSBasic and QB Using <LFCR> (As 2 keystrokes not as the literal "<LFCR>") indicated that the code line continues on the next line. I.E. the input code that appears on the "next line" is a continuation of the last line and continues until the appearance of the standard <crlf> end-of-line. EdF I've never heard of this... but I'd figure I'd give it a try... In QB4.5 when I attempt to use these "keystrokes" as you suggest, the IDE simply *executes* these immediately. Meaning the cursor moves, but marching forward in order to see if it would work I attempted to put in the following: ``` PRINT <LF><CR>"Hello World" ``` In order to "type" the <LF> and <CR> characters, I'm using the ALT+threenumber approach as my keyboard doesn't have a <LF> key... but does, interestingly enough, have a <CR> key labeled "ENTER"; but for this experiment, I did attempt to enter both "keys" using the ALT+threenumber method. This end ends up being on three separate lines and when I press F5 I get greeted with (an expected) "Expected: statement" error message. So in my experimentation, this doesn't seem to be the case with QB (specifically, QB v4.5). As for MBASIC, I'm still waiting on my preorder for an IMSAI 8080 clone to complete (probably sometime in April/May)... so not able to give it a go. With that said, I suspect that it will result in the same manner as the inclusion of the <CR>, to my knowledge, is the end of the line. As for whether or not some versions of BASIC could somehow handle the <LF> in some special manner, I'm not sure... but I suspect that this isn't the case. But if you have any documentation, samples, specific examples (versions) I'd be happy to dive deeper into this particular rabbit hole.
|
|
|
Post by visionmercer on Jan 26, 2023 10:22:16 GMT
Underscore is used to do line continuation in qb64:
Print "Hello, ";_ "World! "
|
|
|
Post by bplus on Jan 26, 2023 18:14:20 GMT
Underscore is used to do line continuation in qb64:
Print "Hello, ";_ "World! "
Oh is that what he was talking about, LOL.
|
|
edf
New Member
Posts: 3
|
Post by edf on Feb 12, 2023 18:56:33 GMT
ok thanks, I'll change all the <LFCR>'s to underscore
The LFCR code was created using .... Wordstar and/or TECO ... if that dated it for you.
Thanks for the info
Ed F
By the way ...
is there a 128 bit integer data type in QB64??
|
|