<pascaldra...@googlemail.com>
Komu: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Datum: 10.06.2016 08:03
Předmět: Re: [fpc-pascal] Type helper for array
Am 10.06.2016 07:36 schrieb "Jürgen Hestermann" <juergen.hesterm...@gmx.de
<juergen.hesterm..
Am 10.06.2016 07:36 schrieb "Jürgen Hestermann" :
>
> Am 2016-06-09 um 20:18 schrieb Sven Barth:
>
> > Am 09.06.2016 17:57 schrieb "Vojtech Cihák" :
> > > aBuffer.Clear;
> > > Is it possible to do this without helper?
> >
> > You can always set
Am 2016-06-09 um 20:18 schrieb Sven Barth:
> Am 09.06.2016 17:57 schrieb "Vojtech Cihák" :
> > aBuffer.Clear;
> > Is it possible to do this without helper?
>
> You can always set the array to Nil
IMO SetLength(aBuffer,0) would the most natural way to clear the array.
Am 09.06.2016 17:57 schrieb "Vojtěch Čihák" :
>
> Hello,
>
> I've got following declaration:
> ...
> {$modeswitch typehelpers}
>
> interface
>
> uses
> Classes, SysUtils;
>
> type
> TBuffer = array of Single;
>
> { TBufferHelper }
> TBufferHelper = type helper for
Hello,
I've got following declaration:
...
{$modeswitch typehelpers}
interface
uses
Classes, SysUtils;
type
TBuffer = array of Single;
{ TBufferHelper }
TBufferHelper = type helper for TBuffer
procedure Clear;
end;
...
var aBuffer: TBuffer;
...
And I can do:
aBuffer[3]:=5;