Subj : filemode
To   : All
From : Chris Hoppman
Date : Mon Jul 05 2004 09:00 am

I found the snippet on the html swag that explain'd it.

http://www.bsdg.org/SWAG/FILES/0003.PAS.html

now, i am having trouble with blockread/write.

I want to write to a file using a record that will allow only
the used length of the vars to be wrote.  I did it once before,
but it was over a year ago and since lost the source (a hd crash)
and I am tring to reprogram them to work as they once was. I can't
for the life of me remember how I did it.  I think I used a
pchar in the $x+ state with a array[0..1023] of char linking
the pchar and the array and using StrPas or StrCopy to copy
to a string to store in a record.

I'll figure it out.  So far what I have come up with is basicly
a array of a record with a char defined as the one var in it.


type
  TBuffer = {$ifdef} virualpascal {$enddef} record
     ch : char;
  end;


var
 Buffer  : array[0..1023] of ^TBuffer;
 PBuffer : PChar;

Which sucks cause I would have to referance each one with the brackets [xx]
buffer[xx].^ch, but would accompish what I want, but I think there is a better
way.

--- Renegade v06-27.4 Alpha
* Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)