| Date: | Mon, 17 Jan 2005 19:54:48 -0500 |
| Reply-To: | Raynald Levesque <rlevesque@videotron.ca> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Raynald Levesque <rlevesque@videotron.ca> |
| Subject: | Re: tabs in strings |
| In-Reply-To: | <6.1.1.1.2.20050117095851.01b8d3f8@mail.staff.unimelb.edu.au> |
| Content-type: | text/plain; charset=US-ASCII |
Hi Simon,
The following illustrates how to create a string variable containing a TAB
character. That variable can then be used in you ANY function.
DATA LIST LIST /str1(A2).
BEGIN DATA
79 /* letter O */
80 /* letter P */
09 /* TAB character */
END DATA.
STRING char(A1) str25(A25).
COMPUTE char=STRING(NUMBER(str1,N2),PIB1).
COMPUTE str25=CONCAT("---",char,"===").
LIST str25.
HTH
Raynald Levesque Raynald@spsstools.net
Visit my SPSS site: http://www.spsstools.net
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Simon Freidin
Sent: January 16, 2005 6:05 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: tabs in strings
Anyone know how to identify tabs in strings?
I want to identify a tab delimiter in the following expression:
do if any(delim,',',' ','/',"'",'"','(','*','-','+','>','<','=',' ').
delim is a single character. The last item in the list is a
tab-in-single-quotes but spss doesn't recognise it.
tia
Simon
Research Database Manager and Analyst
Melbourne Institute of Applied Economic and Social Research
The University of Melbourne
Melbourne VIC 3010 Australia
New Tel: (03) 8344 2085 New Fax: (03) 8344 2111
http://www.melbourneinstitute.com/hilda/
|