On Thu, 12 Jul 2001 14:51:08 -0400, Jim Limburg wrote:
>Curious though one of the variable in the report does stay around
>vname...
If a report variable exists before the PRINT statement, and is also used
in the report, that variable will never be cleared at the end of the report,
no matter how the "clear variables" setting in the report is set. This
enables you to do things like have a second report or your program
"remember" a variable from a first report, or have page numbering
continue into a second report (or start over at a breakpoint within a
report).
But that's also why the naming convention for report variables can be
important. It can help prevent those expressions like ...
myvar = (.myvar + othervalue)
... from starting at the wrong place at the beginning of a report.
Or a good naming convention can prevent an accidental re-use of the
same variable name for two different purposes, one in the report, and
one outside the report, each one clobbering the value that should be in
the other.
Bill