J
Jess
Is there a way to print a variable's data type - like int, string, dbl?
Is there a way to print a variable's data type - like int, string, dbl?
=?Utf-8?B?SmVzcw==?= wrote on 15 jun 2006 in
microsoft.public.inetserver.asp.general:
<script language='javascript' runat='server'>
var myVarable = 2
response.write(typeof myVarable);
</script>
Evertjan. said:Evertjan. wrote on 15 jun 2006 in microsoft.public.inetserver.asp.general:
And, not teasing you any more, vbscript has:
Dim ArrayVar(4), MyType
NullVar = Null ' Assign Null value.
MyType = TypeName("VBScript") ' Returns "String".
MyType = TypeName(4) ' Returns "Integer".
MyType = TypeName(37.50) ' Returns "Double".
MyType = TypeName(NullVar) ' Returns "Null".
MyType = TypeName(ArrayVar) ' Returns "Variant()".
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.