Monday, July 7, 2008

Winrunner -Scope of Variables

Winrunner has four different types of variables. They are used inside the funciton, outside the function and calling from different tests.

auto : An auto variable can only be declared within a function and is local to that function.
It exists only while the function is running. A new copy of the variable is created each time the function is called.

static : A static variable is local to the function, test, or compiled module in which it is declared. The variable retains its value until the test is terminated by a Stop command.

public : A public variable can only be declared within a test or module, and is available for all functions, tests, and compiled modules.

extern : An extern declaration indicates a reference to a public variable declared outside of the current test or module.

For more info, See the Winrunner Help.

No comments: