[comp.lang.modula2] FileSystem

Patrick.Verkaik@p11.f39.n512.z2.fidonet.org (Patrick Verkaik) (11/17/90)

Hello, can anybody who knows anything about the FST compiler help me with the 
following problem? 

In one of my (implementation) modules I have declared a record 
type, which contains a few variables, amongst which a File 
(FileSystem.File) variable. After that, I declared pointers to 
this record type to access any number of files. Unfortunately 
Close doesn't seem to work: the module is compiled without any 
problems, the same with any programmes that IMPORT this 
implementation module, but, after linking without any problems, 
I get an error message when I try to execute a programme, 
something like: DEALLOCATE, and wrong variable type, or 
something.
Also, I had some trouble assigning NIL to a pointer elsewhere in 
the implementation module... 


--  
uucp: uunet!m2xenix!puddle!2!512!39.11!Patrick.Verkaik
Internet: Patrick.Verkaik@p11.f39.n512.z2.fidonet.org

root@pain (System Administrator) (11/20/90)

Patrick.Verkaik@p11.f39.n512.z2.fidonet.org (Patrick Verkaik) writes:

> Hello, can anybody who knows anything about the FST compiler help me with
> the following problem?
Not sure if I qualify...but here goes:

> implementation module, but, after linking without any problems, 
> I get an error message when I try to execute a programme, 
> something like: DEALLOCATE, and wrong variable type...
> Also, I had some trouble assigning NIL to a pointer elsewhere in
> the implementation module... 

I've been lucky enough to stay away from FileSystem.File till now, but I
have encountered a similar problem with pointers like the one you mentioned.
The bug is that for some reason, you are attempting to DEALLOCATE NIL!
During debuging stages, I add, IF Ptr#NIL THEN DEALLOCATE (Ptr,SIZE(Ptr))....
That should help a little.  If you don't know where its crashing, you can
use the dbgMap feature to locate the problem procedure.