<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
From memory (which is not as good as it use to be), Delphi 1*
introduced variable length strings, String[32] was a string of up to
32 characters (I think it's actually size was 33 bytes - an extra
byte to indicate length stored in position 0). Prior to that
strings were always 256 bytes (1 length byte and 255 character
bytes) - which when you only have 64k of memory....<br>
<br>
*It may have been a version of Turbo Pascal.<br>
<pre class="moz-signature" cols="72">Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
<a class="moz-txt-link-freetext" href="http://www.salespartner.co.nz">http://www.salespartner.co.nz</a>
Follow us on Twitter <a class="moz-txt-link-freetext" href="http://twitter.com/salespartner">http://twitter.com/salespartner</a>
PO Box 13085
Johnsonville
Wellington </pre>
<br>
On 17/01/2012 9:48 p.m., Jolyon Smith wrote:
<blockquote
cite="mid:CALXexOp2+zXonE0OAHG+TjyKJ7F5jXLSRW8cu6yjTRwrWCP4nA@mail.gmail.com"
type="cite">@Stefan
<div><br>
</div>
<div>Of course there are reasons to use short strings, just as
there are reasons for using ANSIString, RawByteString and all
the other string types. Horses for courses.</div>
<div><br>
</div>
<div>In the case of short strings, the reasons are the same
reasons there always were - most especially for use in records
used for structured file access (file of <record type>).
And I am not so sure about the idea that 255 bytes are always
allocated - surely the whole point of a declared short string
type of a specified length is that it will hold a string of that
declared length, come what may.
<div>
<br>
</div>
<div>Otherwise using file of <record type> containing
short string fields would never have worked!</div>
</div>
<div><br>
</div>
<div>+0.02</div>
<div><br>
</div>
<div>Jolyon</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</body>
</html>