Trailing-Edge
-
PDP-10 Archives
-
BB-D480F-BB_1985_short
-
ioexpr.for
There are 9 other files named ioexpr.for in the archive. Click here to see a list.
PROGRAM IOEXPR
C COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1983, 1985
C ALL RIGHTS RESERVED.
C
C THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
C ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
C INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
C COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
C OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
C TRANSFERRED.
C
C THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
C AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
C CORPORATION.
C
C DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
C SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
C August 1981
C CDM
C Test for expressions on I/O statments.
C-100-
WRITE(20) 1,2,3,4+1
CLOSE(20)
READ(20) J1,J2,J3,J4
IF (J1.NE.1) TYPE 100,J1
IF (J2.NE.2) TYPE 110,J2
IF (J3.NE.3) TYPE 120,J3
IF (J4.NE.5) TYPE 130,J4
100 FORMAT(' ?Error 100. J1='I4', should =1')
110 FORMAT(' ?Error 110. J2='I4', should =2')
120 FORMAT(' ?Error 120. J3='I4', should =3')
130 FORMAT(' ?Error 130. J4='I4', should =5')
C-200- Formatted I/O.
I=2; J=3
X=24.5
II=0
K=1
WRITE(21,200) I+J,24.5/X,(II+K, II=-1,2),II
200 FORMAT(I,F,5I)
CLOSE(21)
READ(21,200) J1,X2,J3,J4,J5,J6,J7
IF (J1.NE.5) TYPE 210,J1
IF (X2.NE.1) TYPE 220,X2
IF (J3.NE.0) TYPE 230,J3
IF (J4.NE.1) TYPE 240,J4
IF (J5.NE.2) TYPE 250,J5
IF (J6.NE.3) TYPE 260,J6
IF (J7.NE.3) TYPE 270,J7
210 FORMAT(' ?Error 210. J1='I4', should = 5')
220 FORMAT(' ?Error 220. X2='F', should = 1.')
230 FORMAT(' ?Error 230. J3='I4', should = -1')
240 FORMAT(' ?Error 240. J4='I4', should = 0')
250 FORMAT(' ?Error 250. J5='I4', should = 1')
260 FORMAT(' ?Error 260. J6='I4', should = 2')
270 FORMAT(' ?Error 270. J7='I4', should = 3')
END