michael1@ihlpf.UUCP (04/15/87)
Do any of you bright Turbo users out there know of the ramifications of turning on or off the following parameters (under MS-DOS): $V - paramter type checking $K - stack checking $R - array index range checks? Yes, I've read the descriptions in the reference manual, 1. what I'm asking is -> What CODE ramifications are there? I know CTRL-C checking significantly reduces speed due to int 3 checks. What happens with the above? 2. Also, what are the switches for "fast" or bios usage? I recall something like the $G or $P swithes? Any help? 3. Is calling a routine with PROCEDURE(variable-name: STRING50); better or worse (stack wise) than PROCEDURE(var: variable-name: STRING50); STRING50 defined as type STRING50: array[0..49] of char; Thanx for any help! Mike -- Mike !ihnp4!ihlpf!michael1
chw@vax5.CIT.CORNELL.EDU (04/14/89)
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
cs3b3aj@maccs.McMaster.CA (Stephen M. Dunn) (04/21/89)
In article <18366@vax5.CIT.CORNELL.EDU> chw@vax5.cit.cornell.edu (Cindy M. Hannah-White) writes: ... >"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. The reason why they use TPU files (yes, they're proprietary ... does anyone know their structure?) is to support strong typing. Their format allows info on your user-defined types and the types of your functions and arguments to be used to check your other modules for type agreement. Borland also claims that TPU files make linking faster and that they also allow smart linking (i.e. not linking in unused procedures and functions). -- ====================================================================== ! Stephen M. Dunn, cs3b3aj@maccs.McMaster.CA ! DISCLAIMER: ! ! This space left unintentionally blank - vi ! I'm only an undergrad ! ======================================================================