VB Variables - defining type and using global
1) Why is there no way to define the type of a variable in VBScript? I can in VBA. I would like to define more complex objects and tables.
dim myvar as integer
2) In your help file under "Supported Scripting Languages - Specifics of Usage" you say "Variables that are declared with the Dim statement within a routine are only visible within that routine. Variables that are used without declaring them with Dim, become global variables."
When I try and use this behaviour it has no effect? Is the statement correct? The following code logs the number 5. If the statement is true then it should log 10.
sub childSub
tbControlUtility = 10
end sub
sub parentSub
tbControlUtility = 5
call childSub()
log.message("tbControlUtility = " & tbControlUtility)
end sub