Delphi: no VarIsBoolean () function?

In .pas variants, there are several VarIsXXX () functions for checking the type of variant. However, there is no VarIsBoolean ().

What is your preferred way of checking if a type is of type boolean?

+6
boolean delphi variant
source share
1 answer

Try

varIsType(v, varBoolean); 

Easily write your own VarIsBoolean function

 function VarIsBoolean(const V: Variant): Boolean; begin result := varIsType(v, varBoolean); end; 
+18
source share

All Articles