Is there such a data type that is inherited by all data types

I know Variant and Object are data types that inherits all non-class data types (I think) and the object type inherits any class. What data type would at the top of the hierarchy that is higher than variant and object. So for example, a string or a textfield could be put under that same data type. This is useful for very flexible arrays.


There is no such object. However, if you make an array of type Variant, you’ll get what you’re looking for.

…but don’t complain later when you are casting stuff left and right, creating mangled code that is difficult to maintain. In general, in my experience, the casual use of variants indicates a design flaw. Think twice before embedding them into your design.

Variant. But it isn’t part of any inheritance. It’s a catch-all that foregoes any type safety but can hold any data type.

And you still can’t send another type of array to a generalized method that wants to deal with some array. In other words, if your method expects an array of Variant, you can’t send it an array of String.

but you can give it a variant containing an array…

That really wouldn’t make a difference if you want to work with the elements of the array since you’d still have to convert it from the variant.

of course, Kem.
There is a feature request to convert any object array to an array of variant to process them. I hope it gets implemented someday.