
14.12.2011, 18:08
|
Прохожий
|
|
Регистрация: 14.12.2011
Сообщения: 4
Репутация: 10
|
|
В чем ошибка, извините..?
Код:
[Error] Project1.dpr(25): Operator not applicable to this operand type
Код:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
cityname: array [0..1120] of string;
//cityindex: array [0..1120] of Integer;
f:Text;
s:string;
i:Integer;
begin
{ TODO -oUser -cConsole Main : Insert code here }
Assign(f,'cities.txt');
Reset(f);
for i:=0 to 1120 do
Readln(f,cityname[i]);
s:='go';
while s <> 'exit' do
begin
Readln(s);
if s in cityname then
begin
Writeln(s);
end
else
begin
Writeln('There is no such city! Try again.');
Readln(s);
end;
end;
Close(f);
Readln(s);
end.
|