Warning on comparing a SmallInt with result of Ord function

后端 未结 2 664
清歌不尽
清歌不尽 2021-01-15 10:49

I\'m comparing a SmallInt variable with the result of the Ord function. Example:

var
  MySmallInt : SmallInt;
begin
  MySmallInt :=         


        
2条回答
  •  再見小時候
    2021-01-15 11:15

    Ord() is an intrinsic function that yields an unsigned type. Hence the warning. In your case, you are passing it a WideChar, and so the matching integral type is Word.

提交回复
热议问题