Hello All!
Using Delphi 2.0
Type
TRec = Record
Item : String;
End;
Var
P : Pointer;
MyRec : TRec;
BF : File;
Loop : Word;
Begin
AssignFile(BF,'Myfile.dat'); //BF Holds E.G. 10 records
Reset(BF,1);
Getmem(P,FileSize(BF));
BlockRead(BF,P^,FileSize(BF));
For Loop:=1 To 10 Do
Begin
> Move(P^,MyRec,SizeOf(MyRec));
...
End;
Freemem(P,FileSize(BF));
CloseFile(BF);
End;
Now to the problem which is with the move statement.
As you can see I have put the complete file into memory. With Move(P^,...
I have succeeded in moving the first record from memory to MyRec, but now I
need to know how to move the NEXT to MyRec from P^.
Anybody who can help me out??
Kind regards Ole
Team: Dark Skies
Team: X-Files
--- Pr›v CDMag 2.50 fra Primeware.
---------------
* Origin: Nightcall Point (2:237/10.150)
|