[comp.lang.pascal] Turbo 4 and the truncate command on textfiles

NCLARKE%DREW.BITNET@cunyvm.cuny.edu (07/03/88)

Well, another new "feature" has come to my attention while attempting
to convert some programs from tp3 to tp4.  It seems that the people
at Borland decided to remove the ability to use TRUNCATE on a text
file.  This quite distressing, as that I haven't the time to learn
how to write a new one (aside from the simple cludge of rewriting the
entire file), so here I am to ask for help.  If anyone knows how to
write a truncate procedure for a textfile, let me know.  Borland seems
to have made a practice out of removing old useful commands... perhaps
we'll get this one back in the next release, like overlays and a few
other things.

   Neil Clarke
   Box 313
   Drew University                nclarke@drew.bitnet
   Madison, NJ 07932              Drew BBS - 201-377-7861,4538,8245

NCLARKE%DREW.BITNET@cunyvm.cuny.edu (07/03/88)

The DOS command at $40 does not do the trick.  (Oh and its := for assignment
>grin<)   I just tried Ralf Brown's solution on my PC here, and it had
absolutely no effect.  (By the way, where did you find that setting CX to 0
would truncate?  Its not in my docs.)   Can anyone suggest another approach
to this, or the possible error in the original solution?


   Neil Clarke
   Box 313
   Drew University                        NCLARKE@DREW.BITNET
   Madison, NJ  07932                     Drew BBS 201-377-8245,8193,6810