On 08/17/2017 01:10 AM, Sven Barth via Lazarus wrote:
Am 17.08.2017 04:16 schrieb "wkitty42--- via Lazarus" > On 08/16/2017 06:46 PM, Luca Olivetti via Lazarus wrote:
 >> I started using strings as communication buffers since delphi 2. There
 >> weren't even dynamic arrays then...
 >
> really? delphi came from TP/BP... i was (still am, actually) using dynamic > arrays in TP6 ;)

Dynamic arrays in the form of "array of Type" were only introduced in Delphi 3 if I remember correctly. Anything before that needed manual memory management.

IIRC, we do it with

  var foo : array[0..0] of blerg;

and yes, we had/have to be very careful... i think range checking had to be off, also, because the additional elements were outside of the declared compile time range... we didn't have anything like setlength() to adjust the range at that time...


--
 NOTE: No off-list assistance is given without prior approval.
       *Please keep mailing list traffic on the list unless*
       *a signed and pre-paid contract is in effect with us.*
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to