ATmega328 Dynamische Array

Antworten
Mathias
Beiträge: 6167
Registriert: Do 2. Jan 2014, 17:21
OS, Lazarus, FPC: Linux (die neusten Trunk)
CPU-Target: 64Bit
Wohnort: Schweiz

ATmega328 Dynamische Array

Beitrag von Mathias »

Mache ich folgendes:

Code: Alles auswählen

procedure TWIwriteBuf(buf: array of byte);
begin
end;
kommt

Code: Alles auswählen

Project1.pas(18,1) Error: Internal error 2017091103


Mache ich:

Code: Alles auswählen

type
  tbuf = array of Byte;
 
  procedure TWIwriteBuf(buf: tbuf);
  begin
  end;
kommt

Code: Alles auswählen

Project1.pas(27,3) Fatal: Unknown compilerproc "fpc_dynarray_incr_ref". Check if you use the correct run time library.


Dies wird anstandslos kompiliert.

Code: Alles auswählen

type
  tbuf = array of Byte;
var
  buf: array of Byte;
 
begin
  PORTB := buf[0];
end.

Aber bei SetLength scheitert er wieder.

Code: Alles auswählen

begin
  SetLength(buf, 10);
  PORTB := buf[0];
end.

Code: Alles auswählen

Project1.pas(34,3) Fatal: Unknown compilerproc "fpc_dynarray_setlength". Check if you use the correct run time library.\0


Ist dies ein Bug, oder wurde es noch nicht implementiert ?
Mit Lazarus sehe ich grün
Mit Java und C/C++ sehe ich rot

Antworten