Subj : filemode To : Chris Hoppman From : Jasen Betts Date : Tue Jul 06 2004 08:07 pm Hello Chris. 05 Jul 04 08:00, you wrote to all: CH> I found the snippet on the html swag that explain'd it. CH> http://www.bsdg.org/SWAG/FILES/0003.PAS.html CH> now, i am having trouble with blockread/write. CH> I want to write to a file using a record that will allow only CH> the used length of the vars to be wrote. that sounds like it would need variable length records in the file, so yeah using type file and blockread/blockwrite is the right start. for reading and writing you can either compose all the fileds together into an array of bytes (or chars etc) and write it in a single operation or read and write the fields indiidually. CH> for the life of me remember how I did it. I think I used a CH> pchar in the $x+ state with a array[0..1023] of char linking CH> the pchar and the array and using StrPas or StrCopy to copy CH> to a string to store in a record. Sounds like the first method. CH> type CH> TBuffer = {$ifdef} virualpascal {$enddef} record CH> ch : char; CH> end; CH> var CH> Buffer : array[0..1023] of ^TBuffer; CH> PBuffer : PChar; CH> Which sucks cause I would have to referance each one with the CH> brackets CH> [xx] buffer[xx].^ch, but would accompish what I want, but I think CH> there is a better way. Why do you want an array of pointers? (i think it should be an array of char) Jasen --- GoldED+/LNX 1.1.4.7 * Origin: (3:640/1042) .