Case isa array?

With a select case, how can I determine if a value is an array. This don’t seem to work.

select case val
case isa array
//it's an array
end select

Thanks

It seems I have to use an if else statement with something like:

if val.isvarient then
//it's an array
end if

IsA is for comparing against object classes and Array isn’t one. The only situation in which it would not be obvious whether val is an array would be when val is of type Variant, and in that case you could use IsArray.

[quote=108528:@Oliver Scott-Brown]With a select case, how can I determine if a value is an array. This don’t seem to work.

select case val
case isa array
//it's an array
end select

Thanks[/quote]

I would avoid using a reserved name for a variable http://documentation.xojo.com/index.php/Val as this can create compilation errors.

use VarType
http://documentation.xojo.com/index.php/VarType

Select Case value.VarType Case Variant.TypeArray // it's an array Select Case value.ArrayElementType Case Variant.TypeString // it's an array of Strings Else ... End Select Else // not an array ... End Select

[quote=108583:@Norman Palardy]use VarType
http://documentation.xojo.com/index.php/VarType[/quote]
Thanks