Date: Fri, 2 Nov 2001 17:30:58 -0500
Reply-To: Tom Frenkel <taf2@NYU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Frenkel <taf2@NYU.EDU>
Subject: Re: Wow! - Thanks - RE: Simple Base SAS Qn.
In-Reply-To: <20011102221457.26497.qmail@web13208.mail.yahoo.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII
Just don't use the LENGTH function to check how many Y's are left. Even
if all the characters are gone, you would still get a value of 1! In
other words, the LENGTH function returns a value of 1 for a "missing"
character value.
--Tom
Tom Frenkel <taf2@nyu.edu>
http://homepages.nyu.edu/~taf2
> > you could compress out all letters other than Y and
> > test the length, ie
> > number of characters remaining.
> > How to count # of times a particular letter
> > appears in a string.
> >
> > For Example: I need to count how many Ys are in the
> > string
> >
> > 'NNNNYNNNNNNYYYNYYYNNYNNYNNNNYYYNNYYY'
|