Google
 

Trailing-Edge - PDP-10 Archives - BB-D480F-BB_1985_short - do.for
There are 11 other files named do.for in the archive. Click here to see a list.
	PROGRAM DO

!COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1981, 1985
!ALL RIGHTS RESERVED.
!
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
!ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
!INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
!COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
!OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
!TRANSFERRED.
!
!THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
!AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
!CORPORATION.
!
!DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
!SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

!	Version 7	DO.FOR

!	Basic testing of DO loops.
!	The number of times the loop is executed is counted
!	then checked.

	ICOUNT=0
	DO 100 I=1,10
	ICOUNT=ICOUNT+1
100	CONTINUE
	IF (ICOUNT.NE.10) TYPE 110,ICOUNT
110	FORMAT(' ?Error line 100 ICOUNT='I6', should =10.')

	ICOUNT=0
	DO 200 I=100,11,-1
	ICOUNT=ICOUNT+1
200	CONTINUE
	IF (ICOUNT.NE.90) TYPE 210,ICOUNT
210	FORMAT(' ?Error line 200 ICOUNT='I6', should = 90.')


!	Simple implied DO loops and repeating Formats

300	WRITE(23,310) (I, I=1,20,2)
310	FORMAT(I)
	CLOSE(23)

	IEXPT=1
	DO 320 I=1,10
	READ(23,310) IVAR
	IF (IVAR.NE.IEXPT) TYPE 330,IVAR,IEXPT
	IEXPT=IEXPT+2
320	CONTINUE
330	FORMAT(' ?Error line 300 - Implied Do loops.')

	STOP
	END