How to get element from an ARRAY()

I have this funciton

Private Function shortMONTH() as String()
  Return Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
End Function

and use shortMONTH.indexOF(xyz) to see if xyz is a valid month…

But how can I get one of the names via an index value??

If mth>=1 Then s=s+shortMONTH(mth-1)+"-"

this does not work … TYPE MISMATCH ERROR. Expecting String,but got Int32

found it

Dim tempName() As String=shortMONTH
If mth>=1 Then s=s+tempnameH(mth-1)+"-"

[quote=443757:@Dave S]I have this funciton

Private Function shortMONTH() as String()
  Return Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
End Function

and use shortMONTH.indexOF(xyz) to see if xyz is a valid month…

But how can I get one of the names via an index value??

If mth>=1 Then s=s+shortMONTH(mth-1)+"-"

this does not work … TYPE MISMATCH ERROR. Expecting String,but got Int32[/quote]

This would almost need to have beenshortMONTH()(mth-1)
note the extra empty () so the call is shortMonth() and then you index the returned array
but that too doesnt work (sadly) would be nice if it did

I thought there was already a case for this but I could not find one
<https://xojo.com/issue/56264>