Is there a way to get the run-time information of a function? i.e. How many params the function takes and the data type of each parameter. I'm using VB 6.
The Object Browser, which can accessed through VBs standard toolbar, will give you information about methods & properties that belong to objects and exist in modules.
Not the Object Browser, I'm aware of that. I want to know the run-time information of a function i.e. when the program is running, I want to know the list of parameters and their data types.
Not sure if this is what you mean, but at run-time in the development environment, you can View Local variables by choosing Local from the View menu. Put in a breakpoint where you want to stop the code and look at variables. In the immediate window you can also query variables and change properties. You can even hover the cursor over the code and see the current value of a variable.
Private Function DoIt(ByVal nInput as Long) as Boolean
nInput = nInput * nInput
if nInput > 0 then DoIt = True
end function
Insert a breakpoint at the second line of code and run it.
Code execution stops at the breakpoint.
In the Immediate window type:
?nInput
and hit return and you'll see the current value of nInput
OR
hold your mouse over any occurence of nInput in the code
and you'll see a tooltip that shows you its value
OR
in the Locals window, click on the node for the nInput variable to see it's value. Works with objects and their properties, though some libraries hide info (not sure why).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.