My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Tipo de la variable</title>
</head>
<body>
<h1>Tipo de la variable</h1>

<script type="text/vbscript">

'variable = 12.5
'dim variable
'variable = "texto"
'variable = true
variable = Date

document.write("La variable es de tipo ")

select case VarType(variable)
case 0
document.write("sin inicializar")
case 1
document.write("null")
case 2
document.write("integer")
case 3
document.write("long")
case 4
document.write("single")
case 5
document.write("double")
case 6
document.write("currency")
case 7
document.write("date")
case 8
document.write("string")
case 9
document.write("object")
case 10
document.write("error")
case 11
document.write("boolean")
case 12
document.write("variant")
case 13
document.write("dataobject")
case 17
document.write("byte")
case 8192
document.write("array")
case else
document.write ("no contemplada")
end select

</script>

<hr>
Art&iacute;culo disponible en: <a href="http://lineadecodigo.com/vbscript/conocer-el-tipo-de-una-variable-en-vbscript/">http://lineadecodigo.com/vbscript/conocer-el-tipo-de-una-variable-en-vbscript/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>

</body>
</html>

Change log

r266 by vcuervo on Aug 2, 2010   Diff
Tipo de una variable VBScript
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1409 bytes, 64 lines
Powered by Google Project Hosting