procedure ListMembers;
var
Member, lMembers: string;
lengthOfMember: Longint;
begin
Writeln;
Writeln;
Reset(FileA); //Only need read-only
Reset(FileB); //Only need read-only
while not Eof(FileA) do
begin
Readln(FileA, lMembers);
Write(lMembers);
end;
Writeln(sLineBreak + sLineBreak);
Write( Type the name of the member for more information: );
Readln(Member);
lengthOfMember := Length(Member) + 2;
Seek(FileB, lengthOfMember);
end;
我在试图编纂时就遇到问题。 寻求者;在最后一行中,错误类型是不一致的。 在我网上读到时,我总是想到:档案和var:我看不出为什么把它当作一种坏的样子,而我却把它当作一纸空子。
FileB was Assigned to a text file in the main section of the code. This part is just a procedure.
给予任何帮助。 下面更多的法典。
program WoWProject;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TMember = record
Name : string;
Level : integer;
CharClass : string;
Role : string;
Spec : string;
DKP : integer;
end;
var
FileA, FileB : Textfile;
//THIS PART IS THE PROCEDURE ABOVE
//ANOTHER PROCEDURE HERE UNRELATED TO THIS
//ANOTHER HERE WHICH IS THE WELCOME PROCEDURE
//MAIN
begin
Assign(FileA, CharacterNames.txt );
Assign(FileB, CharacterInfo.txt );
repeat
Append(FileA);
Append(FileB);
Welcome;
until 1=2
end.