Hello,

You can't use dynamic arrays or string type in typed files.
because the size of the record must be fixed and known.
you can use :

TMyRecord2 = record
    AnArray: array [1..300] of Integer;
    AMatrix: array [1..100,1..100] of Boolean;
    str:string[133];
end;

as alternative ways to store data use Tclientdatast or embedded
Firebird database.

Regards.


--- In [email protected], Bembi Prima <bembi.pr...@...> wrote:
>
> Hey all, i have a problem..when i create a record like this
> 
> TMyRecord1 = record
>    AName: String[20];
>    ANumber: Integer;
> end;
> 
> I can easily save this record with typed files (file of TMyRecord1)
> 
> But, in my program, i use record like this
> 
> TMyRecord2 = record
>    AnArray: array of Integer;
>    AMatrix: array of array of Boolean;
> end;
> 
> It can't be done with a simple typed files (file of TMyRecord2). An
error
> occured (Type 'TMyRecord2' needs finalization - not allowed in file
type).
> 
> Is there another way to save this kind of record in a file besides using
> untyped files? Because i don't really know how to deal with untyped
> files. I've searched it everywhere, i still can't find example of how to
> deal with untyped files. If i don't have any other way than using
untyped
> files, would you tell me the basics to use untyped files, or maybe
provide a
> link of a simple tutorial.
> 
> Thank you
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to