KB-31936: Função que retorna o tipo de um objeto.

Descrição:

Que função retorna o tipo de um objeto?

Solução:

A função é TypeName().

Exemplo de script:

Dim ArrayVar(4), MyType

NullVar = Null  
MyType = TypeName(“VBScript”)   ‘ Retorna “String”.
MyType = TypeName(4)            ‘ Retorna “Integer”.
MyType = TypeName(37.50)        ‘ Retorna “Double”.
MyType = TypeName(NullVar)      ‘ Retorna “Null”.
MyType = TypeName(ArrayVar)     ‘ Retorna “Variant()”.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *