stig
New Member
Posts: 40
|
Post by stig on Feb 17, 2022 12:56:14 GMT -5
I'm trying to write a clean text based fullscreen interface, why is not part of this question, but experimenting with the Console3.bas example, LB reports an error in line 5, unfinished string?
nomainwin
dim screen$(25)
for x = 0 to 24
screen$(x) = "" REM <----- next x
|
|
bplus
Full Member
Posts: 127
|
Post by bplus on Feb 17, 2022 14:27:58 GMT -5
REM owns the line! Try ' for comments next to code. Do you have access to Help?
|
|
|
Post by dan1101 on Feb 17, 2022 15:44:40 GMT -5
For some reason, the blank spaces were dropped or erased. The line is supposed to have 80 spaces between the quotes. You can achieve the same thing by doing this:
nomainwin
dim screen$(25)
for x = 0 to 24
screen$(x) = space$(80)
next x
The space$() command can be used to insert the desired number of spaces into a string variable.
If you are referring to the REM <----, you just need to insert a colon between statements to put multiple statements on one line like this:
screen$(x) = "": REM <----
If you are getting an error from the line: screen$(x) = ""
then the problem is somewhere else in the program because that line should NOT produce an error. It is fine.
If I am completely misunderstanding the question, of underestimating your knowledge, then I apologize.
|
|
bplus
Full Member
Posts: 127
|
Post by bplus on Feb 17, 2022 18:13:10 GMT -5
Sure dan1101 that works too, if you like typing ;-))
|
|
stig
New Member
Posts: 40
|
Post by stig on Feb 19, 2022 9:48:18 GMT -5
dan1101, thanks, I assumed LB example code was working, so.. My bad, you are right, I should have figured this out myself out of context. 24 x 80. Thanks!
|
|
stig
New Member
Posts: 40
|
Post by stig on Sept 1, 2022 16:04:20 GMT -5
The REM was just added to point to the grumpy line of code before posting And 'If you are getting an error from the line: screen$(x) = "" then the problem is somewhere else in the program because that line should NOT produce an error. It is fine' No, first thing is, it halts at that line with an 'unfinished string' error, second thing, it's not my program So I will give it up and start from scratch
|
|