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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1049 views
  • 0 likes
  • 4 in conversation