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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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