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 (October 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Oct 2005 16:54:26 -0400
Reply-To:     Yihuan Xu <yihuan.xu@JEFFERSON.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Yihuan Xu <yihuan.xu@JEFFERSON.EDU>
Subject:      %while condition

Hi, All,

I have problems in a %while condition statement. Here is the program. When &c increased by integer, everything is OK, but when it is a floating number, it gave me error messages as below. How to solve this problem? Thank you very much.

SYMBOLGEN: Macro variable C resolves to -5.95 ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &c. lt &maxt. SYMBOLGEN: Macro variable MAXT resolves to 3 ERROR: The condition in the %DO %WHILE loop, , yielded an invalid or missing value, . The macro will stop executing. ERROR: The macro TEST will stop executing.

%macro test;

%let c=-6; %let maxt=3;

%do %while( &c lt 6); %let c=%sysevalf(&c+0.05); %end;

%mend test; %test;


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