Author |
Topic: reading file error (Read 1034 times) |
|
pierscintilla
New Member
member is offline
Gender:
Posts: 30
|
|
reading file error
« Thread started on: May 28th, 2013, 12:00pm » |
|
Hi. I started using LBB to convert some programs that I wrote in LB4 with the aim of testing the potential of BBC that I look very good! I have a problem with the following code to reading text file of about 200Kb.
code: open "c:\text.txt" for input as #1 txt$ = input$(#1, lof(#1)) 'print txt$ close #1
translated code: HIMEM = PAGE + 70000000 INSTALL @lib$+"LBLIBC" : PROC_LBinit : lc%=0 3 `1 = FN_open("c:\text.txt", 1) 4 txt$ = FN_getby(`1, FN_ulong(EXT#`1)) 11 CLOSE #`1
I get a message INPUT $ too long at line 0
There is a possibility of solution? What code I could use the BBC to get the same thing?
Many thanks in advance
|
|
Logged
|
|
|
|
pierscintilla
New Member
member is offline
Gender:
Posts: 30
|
|
Re: reading file error
« Reply #1 on: May 28th, 2013, 6:45pm » |
|
I tried the same translated code with the BBC (trial) and when I launch the program I get an error "NO ROOM". is due to the limitation of the trial? Thanks
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: reading file error
« Reply #2 on: Jun 1st, 2013, 08:40am » |
|
on May 28th, 2013, 12:00pm, pierscintilla wrote:I get a message INPUT $ too long at line 0 |
|
What version of LBB are you running? The current release version (1.87) will give that error because it has a string-length limitation of 64 Kbytes. The beta test version (currently 2.0.0.5) should work OK because it has no such limitation.
The most straightforward thing for you to do is to wait until LBB v2.00 is released, which I expect to be in about two weeks time.
Richard.
|
|
Logged
|
|
|
|
pierscintilla
New Member
member is offline
Gender:
Posts: 30
|
|
Re: reading file error
« Reply #3 on: Jun 1st, 2013, 7:23pm » |
|
Ok. I am running the 1.87 ver.
Instead, for the error "NO ROOM" in BBC is due to the limitations of the trial version?
Thanks
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: reading file error
« Reply #4 on: Jun 1st, 2013, 9:37pm » |
|
on Jun 1st, 2013, 7:23pm, pierscintilla wrote:Instead, for the error "NO ROOM" in BBC is due to the limitations of the trial version? |
|
Almost certainly. The trial version provides only a maximum of 12Kbytes for program+data+stack.
LBB will allow you to run BBC BASIC code, to a degree, by prefixing each line with a ! character. That causes the code to be passed straight through the LB-to-BBC translator. Using that 'trick' you may be able to test some simple BBC BASIC code without the limitations of the trial version.
If you want to join the group of beta testers for LBB v2.00 send me a private message.
Richard.
|
|
Logged
|
|
|
|
|