Hi all,
I would like to put some file operation in a separate precompiled unit. The matter is the assign binding code given in the info file does not work when put in a UNIT, where it works when in the program source itself, and some others units I made exactly the same way works fine (not using to begin do).
Here is the unit code contening just the binding :
--------------
UNIT files_operations;
INTERFACE
Procedure Assign ( Var T: Text; Name: String );
IMPLEMENTATION
Procedure Assign ( Var T: Text; Name: String );
Var B : BindingType;
begin (* Assign *) unbind ( T ); B:= binding ( T ); B.Name:= Name; bind ( T, B ); B:= binding ( T ); end; (* Assign *)
END.
---------------
And when linked as the usual way in the program, it makes it crash (segmentation fault).
gpc --version 2.0(2.7.2.1)
Hi all,
I would like to put some file operation in a separate precompiled unit. The matter is the assign binding code given in the info file does not work when put in a UNIT, where it works when in the program source itself, and some others units I made exactly the same way works fine (not using to begin do).
This problem has been solved in recent (beta) versions of GPC. Moreover, the last beta (October 1997) contains a built-in `assign' procedure, just like Borland Pascal.
You can get from
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/
Best wishes,
Jesper Lund