procedure TForm1.S1Accept(Sender: TObject;
Socket: TCustomWinSocket);
var
MyColor : string;
x: integer;begin
MyColor:=s1.Socket.ReceiveText(); case MyColor of
'Red': X := 1;
'Green': X := 2;
'Blue': X := 3;
else
showmessage(MyColor);
end;
end;
[Error] Unit1.pas(37): Ordinal type required
[Error] Unit1.pas(38): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(39): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(40): Incompatible types: 'Integer' and 'String'
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
为什么。如何使用分支语句
Socket: TCustomWinSocket);
var
MyColor : string;
x: integer;begin
MyColor:=s1.Socket.ReceiveText(); case MyColor of
'Red': X := 1;
'Green': X := 2;
'Blue': X := 3;
else
showmessage(MyColor);
end;
end;
[Error] Unit1.pas(37): Ordinal type required
[Error] Unit1.pas(38): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(39): Incompatible types: 'Integer' and 'String'
[Error] Unit1.pas(40): Incompatible types: 'Integer' and 'String'
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
为什么。如何使用分支语句
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货