|
|
1.1 ! root 1: c comment section ! 2: c ! 3: c fm002 ! 4: c ! 5: c this routine checks that comment lines which have valid ! 6: c fortran statements do not affect the execution of the program ! 7: c in any way. ! 8: c ! 9: c references ! 10: c american national standard programming language fortran, ! 11: c x3.9-1978 ! 12: c ! 13: c section 3.2.1, comment line ! 14: c ! 15: c ********************************************************** ! 16: c ! 17: c a compiler validation system for the fortran language ! 18: c based on specifications as defined in american national standard ! 19: c programming language fortran x3.9-1978, has been developed by the ! 20: c federal cobol compiler testing service. the fortran compiler ! 21: c validation system (fcvs) consists of audit routines, their related ! 22: c data, and an executive system. each audit routine is a fortran ! 23: c program, subprogram or function which includes tests of specific ! 24: c language elements and supporting procedures indicating the result ! 25: c of executing these tests. ! 26: c ! 27: c this particular program/subprogram/function contains features ! 28: c found only in the subset as defined in x3.9-1978. ! 29: c ! 30: c suggestions and comments should be forwarded to - ! 31: c ! 32: c department of the navy ! 33: c federal cobol compiler testing service ! 34: c washington, d.c. 20376 ! 35: c ! 36: c ********************************************************** ! 37: c ! 38: c ! 39: c ! 40: c initialization section ! 41: c ! 42: c initialize constants ! 43: c ************** ! 44: c i01 contains the logical unit number for the card reader. ! 45: i01 = 5 ! 46: c i02 contains the logical unit number for the printer. ! 47: i02 = 6 ! 48: c system environment section ! 49: c ! 50: cx010 this card is replaced by contents of fexec x-010 control card. ! 51: c the cx010 card is for overriding the program default i01 = 5 ! 52: c (unit number for card reader). ! 53: cx011 this card is replaced by contents of fexec x-011 control card. ! 54: c the cx011 card is for systems which require additional ! 55: c fortran statements for files associated with cx010 above. ! 56: c ! 57: cx020 this card is replaced by contents of fexec x-020 control card. ! 58: c the cx020 card is for overriding the program default i02 = 6 ! 59: c (unit number for printer). ! 60: cx021 this card is replaced by contents of fexec x-021 control card. ! 61: c the cx021 card is for systems which require additional ! 62: c fortran statements for files associated with cx020 above. ! 63: c ! 64: ivpass=0 ! 65: ivfail=0 ! 66: ivdele=0 ! 67: iczero=0 ! 68: c ! 69: c write page headers ! 70: write (i02,90000) ! 71: write (i02,90001) ! 72: write (i02,90002) ! 73: write (i02, 90002) ! 74: write (i02,90003) ! 75: write (i02,90002) ! 76: write (i02,90004) ! 77: write (i02,90002) ! 78: write (i02,90011) ! 79: write (i02,90002) ! 80: write (i02,90002) ! 81: write (i02,90005) ! 82: write (i02,90006) ! 83: write (i02,90002) ! 84: c test section ! 85: c ! 86: 41 continue ! 87: ivtnum=4 ! 88: c ! 89: c **** test 004 **** ! 90: c test 004 - blank comment line ! 91: c ! 92: if (iczero) 30040,40,30040 ! 93: 40 continue ! 94: ivon01=4 ! 95: c ! 96: go to 40040 ! 97: 30040 ivdele=ivdele+1 ! 98: write (i02,80003) ivtnum ! 99: if (iczero) 40040, 51, 40040 ! 100: 40040 if (ivon01 - 4) 20040, 10040, 20040 ! 101: 10040 ivpass=ivpass+1 ! 102: write (i02,80001) ivtnum ! 103: go to 51 ! 104: 20040 ivfail=ivfail+1 ! 105: ivcomp=ivon01 ! 106: ivcorr=4 ! 107: write (i02,80004) ivtnum,ivcomp,ivcorr ! 108: 51 continue ! 109: ivtnum=5 ! 110: c ! 111: c **** test 005 **** ! 112: c test 005 - go to in comment line ! 113: c ! 114: if (iczero) 30050, 50, 30050 ! 115: 50 continue ! 116: ivon01 = 3 ! 117: c go to 20050 ! 118: ivon01=5 ! 119: go to 40050 ! 120: 30050 ivdele=ivdele+1 ! 121: write (i02,80003) ivtnum ! 122: if (iczero) 40050, 61, 40050 ! 123: 40050 if (ivon01 - 5) 20050,10050,20050 ! 124: 10050 ivpass=ivpass+1 ! 125: write (i02,80001) ivtnum ! 126: go to 61 ! 127: 20050 ivfail=ivfail+1 ! 128: ivcomp=ivon01 ! 129: ivcorr=5 ! 130: write (i02,80004) ivtnum,ivcomp,ivcorr ! 131: 61 continue ! 132: ivtnum=6 ! 133: c ! 134: c **** test 006 **** ! 135: c test 006 - integer assignment statement in comment line ! 136: c ! 137: if (iczero) 30060,60,30060 ! 138: 60 continue ! 139: ivon01=6 ! 140: c ivon01=1 ! 141: go to 40060 ! 142: 30060 ivdele=ivdele+1 ! 143: write (i02,80003) ivtnum ! 144: if (iczero) 40060,71,40060 ! 145: 40060 if (ivon01-6) 20060,10060,20060 ! 146: 10060 ivpass=ivpass+1 ! 147: write (i02,80001) ivtnum ! 148: go to 71 ! 149: 20060 ivfail=ivfail+1 ! 150: ivcomp=ivon01 ! 151: ivcorr=6 ! 152: write (i02,80004) ivtnum,ivcomp,ivcorr ! 153: 71 continue ! 154: ivtnum=7 ! 155: c ! 156: c **** test 007 **** ! 157: c test 007 - integer assignment statement in comment line ! 158: c integer expression to right of = ! 159: c ! 160: if (iczero) 30070,70,30070 ! 161: 70 continue ! 162: ivon02=6 ! 163: ivon01=7 ! 164: c ivon01= 3*ivon02 ! 165: go to 40070 ! 166: 30070 ivdele=ivdele+1 ! 167: write (i02,80003) ivtnum ! 168: if (iczero) 40070,81,40070 ! 169: 40070 if (ivon01-7) 20070,10070,20070 ! 170: 10070 ivpass=ivpass+1 ! 171: write (i02,80001) ivtnum ! 172: go to 81 ! 173: 20070 ivfail=ivfail+1 ! 174: ivcomp=ivon01 ! 175: ivcorr=7 ! 176: write (i02,80004) ivtnum,ivcomp,ivcorr ! 177: 81 continue ! 178: ivtnum=8 ! 179: c ! 180: c **** test 008 **** ! 181: c test 008 - if statement in comment line ! 182: c ! 183: if (iczero) 30080,80,30080 ! 184: 80 continue ! 185: ivon01=300 ! 186: c if (ivon01) 20080,20080,20080 ! 187: ivon01=8 ! 188: go to 40080 ! 189: 30080 ivdele=ivdele+1 ! 190: write (i02,80003) ivtnum ! 191: if (iczero) 40080,91,40080 ! 192: 40080 if (ivon01-8) 20080,10080,20080 ! 193: 10080 ivpass=ivpass+1 ! 194: write (i02,80001) ivtnum ! 195: go to 91 ! 196: 20080 ivfail=ivfail+1 ! 197: ivcomp=ivon01 ! 198: ivcorr=8 ! 199: write (i02,80004) ivtnum,ivcomp,ivcorr ! 200: 91 continue ! 201: ivtnum=9 ! 202: c ! 203: c **** test 009 **** ! 204: c test 009 - write statement in a comment line ! 205: c ! 206: if (iczero) 30090,90,30090 ! 207: 90 continue ! 208: ivon01=200 ! 209: c 92 write (i02,80002) ivtnum ! 210: ivon01=9 ! 211: go to 40090 ! 212: 30090 ivdele=ivdele+1 ! 213: write (i02,80003) ivtnum ! 214: if (iczero) 40090,101,40090 ! 215: 40090 if (ivon01-9) 20090,10090,20090 ! 216: 10090 ivpass=ivpass+1 ! 217: write (i02,80001) ivtnum ! 218: go to 101 ! 219: 20090 ivfail=ivfail+1 ! 220: ivcomp=ivon01 ! 221: ivcorr=9 ! 222: write (i02,80004) ivtnum,ivcomp,ivcorr ! 223: 101 ivtnum=10 ! 224: c ! 225: c **** test 010 **** ! 226: c test 010 - statement label in comment line ! 227: c ! 228: if (iczero) 30100,100,30100 ! 229: 100 continue ! 230: go to 102 ! 231: c 102 write (i02,80002) ! 232: c go to 111 ! 233: 102 ivon01=10 ! 234: go to 40100 ! 235: 30100 ivdele=ivdele+1 ! 236: write (i02,80003) ivtnum ! 237: if (iczero) 40100,111,40100 ! 238: 40100 if (ivon01-10) 20100,10100,20100 ! 239: 10100 ivpass=ivpass+1 ! 240: write (i02,80001) ivtnum ! 241: go to 111 ! 242: 20100 ivfail=ivfail+1 ! 243: ivcomp=ivon01 ! 244: ivcorr=10 ! 245: write (i02,80004) ivtnum,ivcomp,ivcorr ! 246: 111 continue ! 247: ivtnum=11 ! 248: c ! 249: c **** test 011 **** ! 250: c test 011 - continue in comment line ! 251: c followed by integer assignment statement in comment ! 252: c ! 253: if (iczero) 30110,110,30110 ! 254: 110 ivon01=11 ! 255: c continue ! 256: c ivon01=7000 ! 257: go to 40110 ! 258: 30110 ivdele=ivdele+1 ! 259: write (i02,80003) ivtnum ! 260: if (iczero) 40110,121,40110 ! 261: 40110 if (ivon01 -11) 20110,10110,20110 ! 262: 10110 ivpass=ivpass+1 ! 263: write (i02,80001) ivtnum ! 264: go to 121 ! 265: 20110 ivfail=ivfail+1 ! 266: ivcomp=ivon01 ! 267: ivcorr=11 ! 268: write (i02,80004) ivtnum,ivcomp,ivcorr ! 269: 121 continue ! 270: ivtnum=12 ! 271: c ! 272: c **** test 012 **** ! 273: c test 012 - integer assignment statement in comment line ! 274: c ! 275: if (iczero) 30120,120,30120 ! 276: 120 continue ! 277: ivon01=12 ! 278: c ivon01=ivon01+1 ! 279: go to 40120 ! 280: 30120 ivdele=ivdele+1 ! 281: write (i02,80003) ivtnum ! 282: if (iczero) 40120,99999,40120 ! 283: 40120 if (ivon01 - 12) 20120,10120,20120 ! 284: 10120 ivpass=ivpass+1 ! 285: write (i02,80001) ivtnum ! 286: go to 99999 ! 287: 20120 ivfail=ivfail+1 ! 288: ivcomp=ivon01 ! 289: ivcorr=12 ! 290: write (i02,80004) ivtnum,ivcomp,ivcorr ! 291: c ! 292: c write page footings and run summaries ! 293: 99999 continue ! 294: write (i02,90002) ! 295: write (i02,90006) ! 296: write (i02,90002) ! 297: write (i02,90002) ! 298: write (i02,90007) ! 299: write (i02,90002) ! 300: write (i02,90008) ivfail ! 301: write (i02,90009) ivpass ! 302: write (i02,90010) ivdele ! 303: c ! 304: c ! 305: c terminate routine execution ! 306: stop ! 307: c ! 308: c format statements for page headers ! 309: 90000 format (1h1) ! 310: 90002 format (1h ) ! 311: 90001 format (1h ,10x,34hfortran compiler validation system) ! 312: 90003 format (1h ,21x,11hversion 1.0) ! 313: 90004 format (1h ,10x,38hfor official use only - copyright 1978) ! 314: 90005 format (1h ,5x,4htest,5x,9hpass/fail, 5x,8hcomputed,8x,7hcorrect) ! 315: 90006 format (1h ,5x,46h----------------------------------------------) ! 316: 90011 format (1h ,18x,17hsubset level test) ! 317: c ! 318: c format statements for run summaries ! 319: 90008 format (1h ,15x,i5,19h errors encountered) ! 320: 90009 format (1h ,15x,i5,13h tests passed) ! 321: 90010 format (1h ,15x,i5,14h tests deleted) ! 322: c ! 323: c format statements for test results ! 324: 80001 format (1h ,4x,i5,7x,4hpass) ! 325: 80002 format (1h ,4x,i5,7x,4hfail) ! 326: 80003 format (1h ,4x,i5,7x,7hdeleted) ! 327: 80004 format (1h ,4x,i5,7x,4hfail,10x,i6,9x,i6) ! 328: 80005 format (1h ,4x,i5,7x,4hfail,4x,e12.5,3x,e12.5) ! 329: c ! 330: 90007 format (1h ,20x,20hend of program fm002) ! 331: c comment line before end statement ! 332: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.