Delphi 10.3 使用if多条件例如 if 'a' in ['a', 'b'] 时报错,提示operator not applicable to this operand type;
想将字符串转A码使用
ord(tmp) //tmp:string='a'
时也报错,提示incompatible type
但是直接ord('a') 确没有问题
请教各位大神这是什么原因?看了网上的代码跟我的一模一样的但却没有问题?
...全文
48112打赏收藏
Delphi if in 和ord函数问题
Delphi 10.3 使用if多条件例如 if 'a' in ['a', 'b'] 时报错,提示operator not applicable to this operand type; 想将字符串转A码使用 ord(tmp) //tmp:string='a' 时也报错,提示incompatible type 但是直接ord('a') 确没有问题 请教各位大神这是什么原因?看了网上的代码跟我的一模一样的但却没有问题?