Im trying to save a datarecord (Variable-record?) into a file, but the compiler stops and gives me this error:
variablar.pas(22,24) Error: Typed files cannot contain reference-counted types.
This is the unit's code:
unit variablar;
{$mode objfpc}{$H+}
interface
uses TextStrings,Classes, SysUtils;
type
data = Record
ledig,inne : boolean;
fnavn,enavn,plass,tlf : String;
addr,merknad : TStrings;
nummer : integer;
end;
var
nummer,i : integer;
nykjel : array [1..100] OF data;
datafil : File OF data; //THIS IS WHERE IT STOPS
implementation
end.
This used to work in Turbo-Pascal, and the regular "text-mode FPC" as well, but not in Lazarus.
I'm guessing that there's a somewhat different approach to this in Lazarus?