LB Booster
« reading file error »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:32am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: reading file error  (Read 1034 times)
pierscintilla
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 30
xx 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
User IP Logged

pierscintilla
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 30
xx 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
« Last Edit: May 28th, 2013, 6:46pm by pierscintilla » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
User IP Logged

pierscintilla
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 30
xx 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
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls