LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 26 Jun 2009 11:24:48 -0400
Reply-To:     David Cabana <drcabana@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David Cabana <drcabana@GMAIL.COM>
Subject:      Why is this an error?
Content-Type: text/plain; charset=ISO-8859-1

I am looking for an explanation of the following, which I tested on SAS 9.1.3, service pack 4, on Windows XP.

This will write the value of pi to the log:

data _null_; x = constant('pi'); put x ; run;

This will fail with an error:

data _null_; put constant('pi'); run;

Why is the second version erroneous?

The error was: ERROR 22-322: Syntax error, expecting one of the following: a name, arrayname, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_. ERROR 76-322: Syntax error, statement will be ignored.

Thank you, David Cabana


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