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 (January 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 10 Jan 2004 00:57:51 -0500
Reply-To:   Quentin McMullen <quentin_mcmullen@BROWN.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Quentin McMullen <quentin_mcmullen@BROWN.EDU>
Subject:   Re: Automatic numeric/character type conversion: suggestions wanted for paper
Comments:   To: Bruce Gilsen <bruce.gilsen@FRB.GOV>

On Thu, 8 Jan 2004 18:54:25 +0000, Bruce F. Gilsen <bruce.gilsen@FRB.GOV> wrote in part:

>If anyone has any suggestions for other automatic type conversion >problems, I would greatly appreciate hearing from you (on the list, >off-line, whatever). I'll post a summary to the list if I get >off-line suggestions, and of course I'll cite you in the >paper when it gets written.

This may be a bit esoteric, but I was amused that the following can happen:

160 data x; 161 char="Alfred"; 162 length num 8; 163 num=substr(char,1,1); 164 run;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 163:7 NOTE: The data set WORK.X has 1 observations and 2 variables.

To my mind, I can't imagine a case where you would want to assign a value to a numeric variable by substringing an alpha variable, but SAS proceeds happily along if, before this step, you have coded "missing A;"

Kind Regards, --Quentin


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