=?iso-8859-1?q?Preben=20Mikael=20Bohn?= wrote:
I'm just trying to convert a Delphi program (non-visual) into GPC. I thought it would be much harder, but actually it's very easy. I have one problem though:
In Delphi they use AssignFile instead of Assign. I have defined a unit rtlib, where all Delphi-specific procedures are defined.
Be welcome to contribute it (though some of them are already included with GPC, e.g. AssignFile is in the GPC unit, though with the same limitation you describe).
I first defined AssignFile as
procedure assignFile(var f : TextFile; fileName : string ); begin assign(f,filename); end; { assignFile }
However now I also need to define it with typed files. Is there a way to have more than one definition?
Not yet. We plan to allow `AnyFile' parameters which will accept, well, any file as a parameter and allow such operations that are defined on all file types (e.g. Assign).
Frank