Date: Wed, 26 May 2004 09:41:09 +0100
Reply-To: David Hutton <David.Hutton@cem.dur.ac.uk>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Hutton <David.Hutton@cem.dur.ac.uk>
Subject: Re: define vector according to the number of a variable list [C
an one define a string with a length given by a variable?]
Content-Type: text/plain; charset="iso-8859-1"
Hi, listers.
On a similar question to the one below, is it possible to define a string
variable to a length which has been calculated in the preceding lines?
This is a problem that Luca Meyer brought up recently under the Subject:
Reducing the width of a string variable.
All the best,
David
-----Original Message-----
From: Cady Wan [mailto:xqw1@yahoo.com]
Sent: 26 May 2004 09:39
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: define vector according to the number of a variable list
Dear list,
I would like to define a vector according to the
number of a variable list.
I wrote the following syntax:
DO IF ($casenum = 1).
COMPUTE count=0.
DO REPEAT x = varlist.
COMPUTE count = count + 1.
END REPEAT.
END IF.
LEAVE count.
vector f(count).
It came the error message:
>Error # 4356 in column 14. Text: count
>The format specified is not recognized.
>This command not executed.
>Error # 4267 in column 19. Text: )
>A positive integer or a format was expected within
the parentheses on the
>VECTOR command.
Could someone help me? Thanks in advance!
Cady
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/