LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 Mar 2004 18:35:41 -0500
Reply-To:     "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Subject:      Re: Substring Puzzle
Comments: To: Richard DeVenezia <radevenz@IX.NETCOM.COM>

On Wed, 10 Mar 2004 18:01:29 -0500, Richard A. DeVenezia <radevenz@IX.NETCOM.COM> wrote:

>>A compiler change yes. But is it a bug fix or a clarified feature. Why is >z still 12 length?

Hi,

I have a hypothesis. if c is not initialized but used in an expression, then sas assumes a numeric variable and convert it to a string using best12 format. This is kind of consistent with the following results, too. This is not a definitive test of this hypothesis, but...

Cheers, Chang

data _null_;

z = substr(c,1,1); zz = trimn(d);

length_z = vlength(z); length_zz = vlength(zz);

put (_all_) (= +(-1) "***" /);

run; /* on log z= c=. zz=. d=. length_z=12 length_zz=12 */


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