[Lazarus] Why doesn't this work?

Erwin van den Bosch erwin at deseine.nl
Thu Nov 29 10:41:28 CET 2012


Op 29-11-2012 1:13, Maxim Ganetsky schreef:
> 29.11.2012 2:15, Erwin van den Bosch пишет:
>> procedure TForm1.Button1Click(Sender: TObject);
>> var
>>    iLastError: integer;
>> begin
>>    iLastError:=10053;
>>    if iLastError in [10053, 10054] then Label1.Caption:='Yes, it works!'
>>                                    else Label1.Caption:='No, it doesn''t
>> work!';
>>    // Output : No, it doesn''t work!
>> end;
>
> This should generate range check errors, because AFAIK sets are 
> limited to byte values.

I should have turned range checking on! Then I saved a few hours 
debugging :-(

Thanks for your answer.




More information about the Lazarus mailing list