On 1/22/2014 5:39 PM, Frederic Da Vitoria wrote:
2014/1/22 waldo kitty <wkitt...@windstream.net <mailto:wkitt...@windstream.net>>
the string type is/was a 256 character array with the 0th (zero-th) element
containing the length of the string... this allowed one to immediately know
how many characters to read at once... it was much faster than iterating
thru the array looking for a nul byte as done in other languages...
it was quite innovative at the time and actually lead to the Hudson Message
Base format being developed by Adam Hudson of QuickBBS fame when he was in
high school (grades 10-12)... this message base format was the greatest
thing since sliced bread when it came out and many other BBS packages
adopted it because of its amazing speed and the large number of messages
that could be stored with it...
What was innovative?
the type, itself... it did not exist previously and if there was anything like
it, it was written specially by coders needing... this is likely how it came to
be included, too... i simply do not recall since that was what? some 35+ years ago?
Storing the length as byte 0? I believe old Basic had been doing it for
years before. Basic is not a language I like, but still...
i don't know how BASIC (which BASIC??) did it... each implementation, like the
various pascals, could do things their own way behind the scenes as long as the
results were the same... witness FPC with what it does to achieve the same
results as other pascal languages ;)
as for not liking BASIC, when i found TP and actually learned ASM, i left BASIC
in the dust and never looked back... when i had to start writing dBase II code,
it was like a huge step backwards to BASIC for me... i tended to write my dBase
II code like i did my pascal code... going as low level as i could... oh well...
that was then and dBase is not even around any more AFAIK...
--
NOTE: No off-list assistance is given without prior approval.
Please keep mailing list traffic on the list unless
private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal