Date: Thu, 28 Jun 2001 03:08:54 -0400
Reply-To: Mark Casazza <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Mark Casazza <casazzam@ADELPHI.EDU>
Subject: Re: How to reduce the syntax on if command
If your variables are in order this is a simple do repeat. It would look like:
do repeat old = s_1 to s_12
new = s1 to s12.
if old > 0 new = 1.
If the variables aren't in order, you'll need to list each of them.
"Those who cast the votes decide nothing.
Those who count the votes decide everything."
----- Original Message -----
From: Paul Yeo
Sent: Thursday, June 28, 2001 1:38 AM
Subject: How to reduce the syntax on if command
Hi all list member , i have following syntax , which i like to find out how can i simplify it , So that it will not run the if command so many time.
IF s_1>0 s1 =1 .
IF s_2>0 s2 =1 .
IF s_3>0 s3 =1 .
IF s_4>0 s4 =1 .
IF s_5>0 s5 =1 .
IF s_6>0 s6 =1 .
IF s_7>0 s7 =1 .
IF s_8>0 s8 =1 .
IF s_9>0 s9 =1 .
IF s_10>0 s10 =1 .
IF s_11>0 s11 =1 .
IF s_12>0 s12 =1 .