TypeName Function; VarType Function[Runtime]/text/sbasic/shared/03103600.xhpSun Microsystems, Inc.converted from old format - fpeTypeName functionVarType functionTypeName Function; VarType Function[Runtime]Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.Syntax:TypeName (Variable)VarType (Variable)Return value:String; IntegerParameters:Variable: The variable that you want to determine the type of. You can use the following values:
key wordVarTypeVariable typeBoolean11Boolean variableDate7Date variableDouble5Double floating point variableInteger2Integer variableLong3Long integer variableObject9Object variableSingle4Single floating-point variableString8String variableVariant12Variant variable (can contain all types specified by the definition)Empty0Variable is not initializedNull1No valid data
Example:Sub ExampleTypeDim iVar As IntegerDim sVar As StringDim siVar As SingleDim dVar As DoubleDim bVar As BooleanDim lVar As LongMsgbox 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(lVar) & " " & VarType(lVar),0,"Some types in $[officename] Basic"end Sub