Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ttrdc.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!mgnetp!ltuxa!ttrdc!kad
From: kad@ttrdc.UUCP (Keith Drescher)
Newsgroups: net.lang.f77
Subject: Re: (do) while loops
Message-ID: <536@ttrdc.UUCP>
Date: Tue, 29-Oct-85 09:05:59 EST
Article-I.D.: ttrdc.536
Posted: Tue Oct 29 09:05:59 1985
Date-Received: Wed, 30-Oct-85 06:48:19 EST
References: <144@oberon.UUCP>
Reply-To: kad@ttrdc.UUCP (Keith Drescher)
Distribution: net
Organization: AT&T Computer Systems Division,  Skokie, Ill.
Lines: 46
Summary: 

In article <144@oberon.UUCP> mcooper@oberon.UUCP (Michael Cooper) writes:
>I have been forced to learn Fortran 77 for a course I am taking.
>I've been writting my f77 programs under VMS (v4.1) and am getting real 
>tired of it, so I decided to give f77 under (4.2bsd) unix a try.
>What I ran into was an error about an unknown statement type.  It turned 
>out to be a do while statement of the form:
>
>	DOWHILE(true)
>		something borring
>	ENDDO
>
>My question is: doesn't Unix (ANSI) f77 support a (do) while statement?
>What is it's syntax?
>
>
>
>-- 
>| Michael Cooper		  USENET: ...!{uscvax, sdcrdcf, engvax,	      |

No, the ANSI Fortran 77 Standard does not include a "DO WHILE" type
statement.  It only supports the "DO 5 I = START, STOP INCR" type of DO.

A couple of Fortran 77 books I have seen have suggested the following 
horrendous method of getting around the lack of WHILE loops:


C	
C	The following is being used as a WHILE loop
C
100     IF (condition) THEN
            .
	    .
	    .
            GOTO 100
        END IF
	 

It's unfortunate that even when a standard was finally drafted, it
still left out something as basic and obvious as some kind of
WHILE construct!
-- 
-------------------------------------------------------------------------
Keith Drescher (kad@ttrdc)          	   | ... You can check out any      
ATT Computer Systems Division, Skokie, Il. | time you like - but you can  
PATH: ...!ihnp4!ttrdc!kad                  | never leave ...
-------------------------------------------------------------------------