bpcompat-1.0.zip_(re)

Fri, 23 May 1997 10:57:29 -0400 (EDT)


On Fri, 23 May 1997, The African Chief wrote:

> > They are obviously broken...
> 
> They worked okay in my tests. See the procedure "TestPut"  in
> TESTSTRM.PAS. Can you post a copy of the code that is broken? 

The problem is that TStream.Put simply write off the image of the object
without any type information. So if you Put a TCollection, the object
you'll read with Get won't be necessarily a TCollection. If GPC works like
TP, it has the type of the object in the 2 or 4 first bytes of the object,
but this is compile-dependent. If you add a class or add methods in
another class, the type bytes on the streams won't match those in the
executable and the file will be useless.

> BTW: it is stated clearly that TStream and some of the other
> objects are not complete - so, if anyone wants to implement
> the missing bits, please feel free to do so!

Of course! Peter says the features needed to implement the TStream object
correctly is now in GPC, so I'll get the latest version and work on this!

> It isn't there - but you could write it :-).  We would greatly welcome
> all contributions to the bpcompat package!

I send you the update! Shouldn't take more than a few days (download and
install the newest GPC and do the changes)...

Pierre Phaneuf

"The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offense." - Edsger W. Dijkstra.


Pierre Phaneuf (pp@55-174.hy.cgocable.ca)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es