Strings

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fweil.

...,

Is there any reason to have errors when filling string variables more than 64K bytes ? I am not sure but I thought it was not limited before ...

I use some code filling a string with spaces for example or another loading a text file in a string and I have crashes any time the string size goes over 64KB.

Anyone did test it ?

Francois Weil
14, rue Douer
F64100 Bayonne
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Is there any reason to have errors when filling string variables more than 64K bytes ?

PureBasic doesn't support strings of over 64k... yet.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

But Fred said he will add unlimited strings...
...for v2.90 or v3.00.

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> But Fred said he will add unlimited strings...
> ...for v2.90 or v3.00.

True, but until that appears in the "History" section of the PureBasic docs...


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fweil.

To Fred : for my records ... just I would like to know if it will be possible to use higher length later ! I was just surprised to have had good results using longer strings in one or two tests before.

Francois Weil
14, rue Douer
F64100 Bayonne
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
To Fred : for my records ... just I would like to know if it will be possible to use higher length later ! I was just surprised to have had good results using longer strings in one or two tests before.
Yes, I will add a command to change the string buffer to high value.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fweil.

Great. Thank you for this.

If anyway it would make more sense to not change it, because in most cases we don't need it, maybe it would better to have an exception code or declare to manage 'long strings'.

It is up to you to tell what would be the best to not affect generated code performances and size ...

Rgrds

Francois Weil
14, rue Douer
F64100 Bayonne
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.
maybe it would better to have an exception code or declare to manage 'long strings'.
Yes, maybe a new Variable type. E.g. longstring.ls or other suffix


Regards
André

*** German PureBasic Support ***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

I dont understand why strings are limited in PureBasic.

"64k" looks like a DOS-thing, but not Windows.
In Windows you should be able to use a 1GB-String
without problems.
OK, 1GB is very much - so lets say 10 MB -> shouldnt be a problem.

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> I dont understand why strings are limited in PureBasic.

I agree. What's even stranger is the docs for PureBasic state that strings are
unlimited in size: http://www.purebasic.com/documentation/ ... ables.html

PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Strings are unlimited. String manipyulations aren't limited...

Fred - AlphaSND
Post Reply