以下是部分代码。但总是提示Incompatible types: 'SPComm.TParity' and 'Main.TParity'
li_flag := 0;
if ls_parity = 'None' then li_flag := 1;
if ls_parity = 'Odd' then li_flag := 2;
if ls_parity = 'Even' then li_flag := 3;
if ls_parity = 'Mark' then li_flag := 4;
if ls_parity = 'Space' then li_flag := 5;
{取得奇偶校验}
case li_flag of
1:comm1.Parity := None;
2:comm1.Parity := Odd;
3:comm1.Parity := Even;
4:comm1.Parity := Mark;
5:comm1.Parity := Space;
else begin
Application.MessageBox('请检查[Config.ini],奇偶校验设置有误!','提示',64);
Application.Terminate;
end;
end;
请问怎么实现赋值??
li_flag := 0;
if ls_parity = 'None' then li_flag := 1;
if ls_parity = 'Odd' then li_flag := 2;
if ls_parity = 'Even' then li_flag := 3;
if ls_parity = 'Mark' then li_flag := 4;
if ls_parity = 'Space' then li_flag := 5;
{取得奇偶校验}
case li_flag of
1:comm1.Parity := None;
2:comm1.Parity := Odd;
3:comm1.Parity := Even;
4:comm1.Parity := Mark;
5:comm1.Parity := Space;
else begin
Application.MessageBox('请检查[Config.ini],奇偶校验设置有误!','提示',64);
Application.Terminate;
end;
end;
请问怎么实现赋值??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货