M
Martin Brown
Guest
On 14/04/2014 16:47, John Larkin wrote:
I think you will find it limits maximum string lengths at 2^31-1 or
possibly 2^32-1. Older basics tend to limit it at 2^16-1 = 65535.
Memory was a rare expensive commodity when these languages were born.
Only because you don't know what you are doing.
--
Regards,
Martin Brown
On 14 Apr 2014 10:34:55 GMT, Jasen Betts <jasen@xnet.co.nz> wrote:
On 2014-04-14, Tim Williams <tmoranwms@charter.net> wrote:
"Sylvia Else" <sylvia@not.at.this.address> wrote in message
news:br0tf2Fs854U1@mid.individual.net...
Of all the dubious aspects of the language, that's one that should recieve
the most ire. What a stupid idea. Other languages (I'm only familiar
with QuickBasic offhand) store strings with a length prefix. And do
bounds checking besides.
yeah, but doesn't it put some stupid arbitrary limit on string length?
PowerBasic doesn't put a limit on string length, allows embedded nulls, and has
groovy inherent string functions. Without hazards. Ask for a substring out of
the range of a string and you get the null string. Append to a string and it
just works.
I think you will find it limits maximum string lengths at 2^31-1 or
possibly 2^32-1. Older basics tend to limit it at 2^16-1 = 65535.
Memory was a rare expensive commodity when these languages were born.
I've written PB programs that manipulate huge data arrays, using subscripts,
that run 4x as fast as the obvious c pointer equivalents. With an afternoon of
playing with code and compiler optimizations, the c got close.
Only because you don't know what you are doing.
--
Regards,
Martin Brown