Contents
Index 🔎︎

# TypeName Function; VarType Function

Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.

### Syntax:

    TypeName (Variable) / VarType (Variable)

### Return value:

Numri i plotë për orë

### Parameters:

Variable: The variable that you want to determine the type of. You can use the following values:

keyword | Named constant | VarType | Lloji i publikimit
Boolean |  | 11 | Data (e ndryshueshme)
Byte |  | 17 | Byte variable
Date | V_DATE | 7 | Data (e ndryshueshme)
Currency | V_CURRENCY | 6 | Currency variable
Double | V_DOUBLE | 5 | Gabim: Operacion i pavlefshëm i pikës qarkulluese
Integer | V_INTEGER | 2 | Data (e ndryshueshme)
Long | V_LONG | 3 | **Ndryshorja nuk u gjet**
Object |  | 9 | Variabla e objektit nuk është përcaktuar
Single | V_SINGLE | 4 | Gabim: Operacion i pavlefshëm i pikës qarkulluese
String | V_STRING | 8 | Data (e ndryshueshme)
Variant |  | 12 | Variant variable (can contain all types specified by the definition)
Empty | V_EMPTY | 0 | Kontrollimi i drejtshkrimit nuk është në dispozicion
Null | V_NULL | 1 | jo, ruaj të dhënat ekzistuese

### Error codes:

5 Invalid procedure call

### Example:

    Sub ExampleType
    Dim iVar As Integer
    Dim sVar As String
    Dim siVar As Single
    Dim dVar As Double
    Dim bVar As Boolean
    Dim lVar As Long
    Dim cVar as Currency
    Dim tVar as Date
     MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_
     TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_
     TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_
     TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_
     TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_
     TypeName(cVar) & " " & VarType(cVar) & Chr(13) &_
     TypeName(tVar) & " " & VarType(tVar) & Chr(13) &_
     TypeName(lVar) & " " & VarType(lVar),0,"Some types In LibreOffice Basic"
    End Sub