Liberty BASIC Community Forum
« The longuest speech »

Welcome Guest. Please Login or Register.
Jan 22nd, 2018, 5:59pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: The longuest speech  (Read 158 times)
Sam67
New Member
Image


member is offline

Avatar

What will I absorb here ?


Homepage PM

Gender: Male
Posts: 39
xx The longuest speech
« Thread started on: Nov 1st, 2017, 06:15am »

Hi,
I've found a way to easily serialize strings with a for loop. It's quite fun. I'm a bad programmer but you can do a lot with some BASIC instruction and a bit of stubbornness.
I have a line of 244000 chars!
Actually I've noticed that each line of a txt file could contain anything you want as long as it's not broken with a special char as ".I then add \ in front of it.It's called Escaping chars I think, isn't it ?
With this in mind I think that each line could hold a whole web page whether it's well formated in this purpose.A web page is often updated and can contain lots of information so I would like to know if a line length has ever a limit ?
Thanks
« Last Edit: Nov 1st, 2017, 10:09am by Sam67 » User IP Logged

With BASIC in a box progamming's a joke
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5618
xx Re: The longuest speech
« Reply #1 on: Nov 1st, 2017, 10:29am »

You can hold very long strings in memory and out on disc. The fastest way to get them back from disc is input$(#1,n) This method ignores all line break characters so no need for escape characters to be added.

n might be lof(#1) or if you want to do it in chunks n can be say 10k characters at a time.

Liberty BASIC v4.5 can hold even bigger strings. But you might trip up on displaying and editing very large strings as some controls have a Windows system limit of I think 32k characters. Which is why you might want to take it off disc in chunks.
User IP Logged

Sam67
New Member
Image


member is offline

Avatar

What will I absorb here ?


Homepage PM

Gender: Male
Posts: 39
xx Re: The longuest speech
« Reply #2 on: Nov 1st, 2017, 12:43pm »

I wasn't aware of that.
I was used to c$=mid$(string$, n, 1) to display one character. I Wonder if I will ever get to the end of a line over time smiley
If ever , I'll be very thirsty.

As I said I made several huge arrays in a JS file with Liberty BASIC. In my html a script is triggered by the form input.It loops through the arrays and only keeps the items matching the input , gathering them in a growing string, then it displays the string output as a list of links in html.
Even though I "work" with a monster (Intel I7, 8go ram, it's just enuf 4 gaming) Iím amazed because itís really huge and itís exhausted in a jiffy The list is built up in a few seconds.
What happens when I ask java-script to ask to Internet Explorer " Computer, search among these 370000 words those which begin with..." .
How come this godspeed output can be achieved?
I think thatís a also huge answer and I would be grateful to get an average yet precise summary.

Thanks for the information.
« Last Edit: Nov 12th, 2017, 03:23am by Sam67 » User IP Logged

With BASIC in a box progamming's a joke
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls