About the blog

You can read and download quick reference cards from my blog space for free. The topics cover web design with asp.net, C#, Ajax, statistical programming with SAS, R, software development with visual studio, Delphi, etc.

If you have any question or good suggestion, please contact me or leave a comment. The companion website associated with this blog is http://www.winscard.com, please take a moment to visit it if you want to get more cards.


SAS Programming - Syntax

IF THEN ELSE
if cond1 then exp1;
else if cond2 then exp2;
......
else expn;

DO END
* like begin end or {} in other programming languages
DO
exp1;
exp2;
...;
END;
* repeat for a given iteration, like for(int i=0;iDO index=start TO stop BY increment;
exp1;
exp2;
...;
END;

DO index=start TO stop BY increment while(cond);
exp1;
exp2;
...;
END;

DO index=start TO stop BY increment until(cond);
exp1;
exp2;
...;
END;

* DO WHILE
DO WHILE (cond);
END;

* DO UNTIL
DO UNTIL (cond);
END;

SELECT OTHERWISE
* Like switch case in other programing languages
SELECT(expression);
WHEN(value1) exp1;
WHEN(value2) exp2;
......;
OTHERWISE expn;
END;

No comments:

Post a Comment