BookmarkSubscribeRSS Feed
chimanbj
Obsidian | Level 7
A colleague of mine is wondering how the syntax:

x+1;

works. It obviously produces the same result as:

x=x+1;

but she wants to understand why.

Thanks!
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Review the topic of how a SAS DATA step performs a "retain" or doesn't, depending on the statement syntax and/or whether you have coded a RETAIN statement.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

data step retain value site:sas.com
chimanbj
Obsidian | Level 7
This didn't sufficiently address the question of why this works.
RickM
Fluorite | Level 6
Go to the online doc and search "sum statement syntax"
chimanbj
Obsidian | Level 7
Thank you

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1339 views
  • 0 likes
  • 4 in conversation