hirchert@uxe.cso.uiuc.edu (03/10/88)
In case anyone is interested, the following are some of the reasons the current Fortran 8x draft does not have a DO WHILE statement: 1. It already has a general DO loop in which the test for termination of the loop can appear anywhere within the loop. Given the complaints that 8x is too large, members of the committee were reluctant to adopt additional notation for the special cases of test at the top (DO WHILE) and test at the bottom (DO UNTIL). A related issue was the question of how often DO WHILEs occur naturally (as opposed to how often they are introduced artificially in order to fulfill someone's idea of what structured programming is). 2. At the time X3J3 did its original work on loops, there was an expectation that it would also define a standard macro language for Fortran so that anyone who want special notation for special cases like DO WHILE would be free to write a macro that generated appropriate usage of the general DO. 3. The words "do while" are frequently misinterpreted by novices as meaning that the loop terminates whenever the condition becomes false, even if that is in the middle of the loop. 4. There was at least a little backlash against programmers that insist using DO WHILE even when it is inappropriate (i.e., when using it forces duplication of code). I personally expect to have little use for a DO WHILE but wouldn't object to its presence as long as the more general form is also present. As a member of X3J3, my concern is whether such special forms are appropriate in the face of all the complaints about the size of the language. Kurt W. Hirchert National Center for Supercomputing Applications