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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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