Author |
Topic: LB parses "DATA" word in string (Read 282 times) |
|
tsh73
Full Member
member is offline


Gender: 
Posts: 210
|
 |
Re: LB parses "DATA" word in string
« Reply #6 on: Jul 20th, 2017, 10:42pm » |
|
Your solution , well, solves problem
But interesting thing is - what's going on?
Obviously it's compile-time error
Print is affected too without concatenation, it takes more characters, (for Notice too) but it breaks if word DATA is present:
Code:print "DATA 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
If I move sequence "DATA " in the middle of a string, it errors too.
If we add a letter after DATA (making string longer) it works Code:print "DATAz 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
And it errors only if word DATA all uppercase.
|
| « Last Edit: Jul 20th, 2017, 10:45pm by tsh73 » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: LB parses "DATA" word in string
« Reply #7 on: Jul 20th, 2017, 11:19pm » |
|
on Jul 20th, 2017, 10:42pm, tsh73 wrote:| But interesting thing is - what's going on? |
|
The answer to that can be found in the earlier thread to which you linked. There it says this: "There may be other obscure situations in which it can arise, but again only if the line is very long". This is evidently one of those "obscure situations".
What matters is how best this issue can be resolved to the satisfaction of the OP who encountered it. I have offered an effective solution, which in my opinion improves the readability of the program as well.
I could, in principle, try to trace in the code of LBB exactly what is happening, but what would be the point? The simple fact is that LBB translates the program to BBC BASIC, and BBC BASIC has a maximum line length limit of about 250 characters. In the particular circumstances of the OP's code, this limit is being hit.
Richard.
|
|
Logged
|
|
|
|
RobM
Junior Member
member is offline


Posts: 91
|
 |
Re: LB parses "DATA" word in string
« Reply #8 on: Jul 21st, 2017, 12:13am » |
|
on Jul 20th, 2017, 10:13pm, Richard Russell wrote:| When LB generates the TKN file I believe it concatenates any 'continuation' lines (ending in an underscore) |
|
Yes, I can confirm it does.
|
|
Logged
|
|
|
|
|