LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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/


Back to: Top of message | Previous page | Main SPSSX-L page