[fpc-pascal] Accessing open array

Koenraad Lelong fpascal at brouwerij.homelinux.net
Sun Jun 3 18:41:54 CEST 2012


Hi,

Looking at the C-code again, I saw I could actually use a pointer to 
byte, instead of a pointer to an array of bytes.
So I'm using this :

program LCDtest1;

var
  nCols : cardinal;
  nRows : cardinal;
  nBytes : cardinal;
  pFont : ^byte;

{$include fonts.inc}

begin

// get pointer to the beginning of the selected font table
pFont:=@FONT6x8;
nCols:=pFont^;
nRows:=(pFont+1)^;
nBytes:=(pFont+2)^;
end.

Now my library works.

Thanks,

Koenraad Lelong.



More information about the fpc-pascal mailing list