[fpc-devel] is not operator

Martin Frb lazarus at mfriebe.de
Sat Sep 12 13:15:00 CEST 2026


On 12/09/2026 12:57, Martin Frb via fpc-devel wrote:
>
>
> real example from fpc
>   While (I>=0) and (Not ((Components[i] is ModuleClass) and 
> (TCustomHTTPModule(Components[i]).Kind<>wkOneShot))) do
>
> The not actually does not apply to the "is" => but you need to look 
> twice at least, to spot the double "((" that expresses this.
> (this is excluded from the count at the start, as the regex insists on 
> a single opening "(")
>
>

To clarify that: This itself wont change by having "Is not". But if a 
codebase is maintained with "is not" where applicable, the above will 
stand out as being not "is not". Thus the reader will be more likely to 
avoid the mistake.


More information about the fpc-devel mailing list