Date: Thu, 29 Mar 2007 18:19:22 -0400
Reply-To: Richard Ristow <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <firstname.lastname@example.org>
Subject: Suggest: Allow LEAVE, with scratch variables
Content-Type: text/plain; charset="us-ascii"; format=flowed
Here's a booby-prize suggestion, maybe, but it would help a lot with
some kinds of testing.
From the SPSS 15 Command Syntax Reference, though it's been true more
or less forever (p.34, section "Scratch Variables"):
.. Scratch variables are initialized to 0 for numeric variables or
blank for string variables.
.. SPSS does not reinitialize scratch variables when reading a new
.. Do not use LEAVE with a scratch variable.
And p.895, article on "LEAVE" command:
LEAVE suppresses reinitialization and retains the current value of the
specified variable or variables when the program reads the next case.
It also sets the initial value received by a numeric variable to 0
instead of system-missing. [...] LEAVE cannot be used with scratch
In other words, scratch variables *always* behave as regular variables
do, for which LEAVE is specified.
The documentation should make this clear, of course. I understand
that's in the works.
HERE, I suggest: accept LEAVE, with scratch variables. Of course, it
doesn't change anything.
You'd use it like this:
NUMERIC #temp01 #temp02 #status (F3).
LEAVE #temp01 #temp02 #status.
And you'd do it so, if you wanted to switch to regular variables for
testing, you could change to, say,
NUMERIC @temp01 @temp02 @status (F3).
LEAVE @temp01 @temp02 @status.
and the renamed variables would work the same way.