lines in file too long for string...

Just starting out? Need help? Post your questions and find answers here.
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

lines in file too long for string...

Post by muab256 »

heyas!

have some problem here to process a (text) file.
some lines seem to be too long for beeing read (or placed into
a string)...

anybody knowing a workaround?

thx
muab
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

How long is the line?

String type variables are limted to 64k (with most of the string functions further limiting that to 63999 bytes)..

You could use memory buffers for storing the data but manipulating those is a little tricky..

Check out this http://www.purebasic.org/comments.php?id=12_0_1_0_C7 for a few functions to help - though that might not be a total solution depending on what you're trying to do..

Also, check out the fastfile library from the announcements forum, viewtopic.php?t=5655&start=30
Last edited by Karbon on Sat Nov 01, 2003 5:54 pm, edited 1 time in total.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

Post by muab256 »

umm.. im rather newbie....

id be satisfied if i could get the data... it wouldnt have to be
that 1 line is in one string if this would be easier to manage?
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Ok, so how long is the line that you're trying to read? :-)
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

Post by muab256 »

okis, so far (the peak) is 5023

thx

muab
Last edited by muab256 on Sat Nov 01, 2003 6:30 pm, edited 1 time in total.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I thought you were trying to read a line of text from a file :-)

Don't know about the editor problems, have you checked out JaPBE? It's an alternate editor - check the announcements forum for a download link.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

Post by muab256 »

hehe, the problem was:

how to count it? ;P

so i loaded it with the editor...

but the better way was: look for the longest line in a file, delete the
others and read the filesize ;P
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Oh.. ok, lets back up.

What error or problem are you having when trying to read this line. Is your program crashing?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
muab256
User
User
Posts: 43
Joined: Mon Apr 28, 2003 4:57 pm

Post by muab256 »

umm... =(

finally i was too quick believing it was the fault of purebasic ;/

sorry for that...

muab
Post Reply