Toad World® Forums

test a local variable inside a program


Good afternoon Steven,

I hope you are doing good;

I do not understand how to monitor a local variable.
I included a true/false grid and a procedure.

The procedure modifies a local variable and that is the value

I want to test against. I tried using the “expression” in the

“Change by program” box, but the code does not recognize the


Would you take the time to do a step by step on how to use Code Tester to monitor a local variable.

Thank you,

Michel Turcot

basicproc.txt (1.41 KB)

truefalsegrid.txt (1.09 KB)



I am sorry to say that (a) not only does Code Tester not allow you to test a local variable, but (b) it simply isn’t possible, without you (or someone) changing the code in your program.

Code testing generally means that you want to test the effects of running your program. This means that the world external to your program has been altered in some measurable way, and you want to measure it and see if it meets expectations.

A local variable is hidden away inside your program and is not accessible for testing.

If the value of that variable is critical, perhaps you should be returning it as an OUT argument.

I hope this makes sense…