# $language = "VBScript" # $interface = "1.0" ' RecursiveProc is a function that will count to 5 recursively ' so we can have a lot of data in the call stack dialog Function RecursiveProc(nextVal) Dim result If not nextVal = 5 Then result = RecursiveProc(nextVal + 1) Else result = nextVal End If RecursiveProc = result End Function ' AProc is a subroutine we can look at in the call stack dialog Sub AProc() Dim a ' Variable to show in call stack dialog Dim b ' Variable to show in call stack dialog Dim connection ' Variable to show in call stack dialog ' Viewing connection in the variables dialog shows the recursive nature of object browsing. ' The connection object has sub-objects with properties that can be viewed set connection = CreateObject("adodb.connection") MsgBox "Result is " & RecursiveProc(0),,"TestScript" end Sub Sub Main() ' Demonstrates a function call AProc End Sub