Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!vax5!chw From: chw@vax5.CIT.CORNELL.EDU Newsgroups: comp.lang.pascal Subject: Turbo Pascal Question Keywords: Public functions procedures in turbo???? Message-ID: <18366@vax5.CIT.CORNELL.EDU> Date: 14 Apr 89 13:50:35 GMT Sender: news@vax5.CIT.CORNELL.EDU Reply-To: chw@vax5.cit.cornell.edu (Cindy M. Hannah-White) Organization: Cornell Vet Computing Services, Ithaca NY Lines: 24 I am new to this "turbo" thing, but I have some code that was developed elsewhere using Turbo Pascal 4.0 and I would like to use these procedures and functions as they are, if possible. It's kind of a long story why, but I NEED to be able to link them in with a C-language program, and call them (as externals) from the C program. Going the other way (which I can do, by the way) won't work. But Turbo Pascal, as far as I can tell, can't create a regular old .OBJ file! I can create a .EXE file, which I can then turn back to a .OBJ file with 'BINOBJ', but I need to have a separate one for EACH external procedure. That won't do either! I used to program with the Microsoft Pascal Compiler, and I THINK I remember (this was a while ago) that you could label a procedure or function as "Public", for use by other modules. In Turbo, they have circumvented all of that with this weird "Unit" stuff, and the .TPU files. It LOOKS like the .TPU file is what the old .OBJ file was, the "Interface" section corresponds to declaring the procedures as "public", and the "uses" is like saying that these things are "extrn". BUT now, because of this (proprietary??) format, I can't call the sub-routines from another language. Anyone have a solution to this? I'm afraid I'm in a bit of a hurry here, but I AM stuck. Thanks LOADS! Cindy Post (best for me) or E-mail to chw@vax5.cit.cornell.edu