Word wheel: Difference between revisions
m
→{{header|Pascal}}
Line 1,798:
WheelSize = 9;
MinLength = 3;
procedure search(
var
Allowed, Required, Available, w : string;
Len, i, p : integer;
Match : boolean;
begin
AssignFile(
try
Reset(
except
writeln('Could not open dictionary file ' +
exit;
end;
Allowed := LowerCase(
Required := copy(Allowed, 5, 1); { central letter is required }
while not eof(
begin
readln(
Len := length(w);
if (Len < MinLength) or (Len > WheelSize) then continue;
Line 1,839:
writeln(w);
end;
CloseFile(
end;
|