Do Which? Loop, Until or While? A Review Of Data Step And Macro Algorithms

This paper reviews the three looping constructs: loop-repeat, do until and do while and offers examples of their use. The purpose of this paper is to provide both pseudo-code and examples so that programmers may understand the difference in logic and make an appropriate choice for their algorithm. The two data step loop processing verbs: continue (return to loop-top), and leave (exit) are illustrated. Macro examples using %goto are shown for continue and leave. The Whitlock subsetting loop — also known as the Do-Whitlock (DOW) loop — and double-DOW are illustrated.

conference: 
Author: 
Paper Type: 
Paper

User login

Syndicate

Syndicate content
Drupal 6 Appliance - Powered by TurnKey Linux