1c comment section 2c 3c fm007 4c 5c this routine tests the use of data initialization statements. 6c data initialization statements are used to define initial values 7c of integer variables. the data statements contain unsigned, 8c positive signed and negative signed integer constants. the last 9c data statement contains the form 10c j*integer constant 11c which indicates the constant is to be specified j times. 12c 13c the tests in this routine check the integer variables in the 14c data statement for the assigned initial values. 15c 16c references 17c american national standard programming language fortran, 18c x3.9-1978 19c 20c section 4.3, integer type 21c section 4.3.1, integer constant 22c section 9, data statement 23c 24c 25c data initialization statements 26c 27 data ivon01,ivon02,ivon03,ivon04,ivon05/3,76,587,9999,21111/ 28 data ivon06,ivon07,ivon08,ivon09,ivon10/+3,+76,+587,+9999,+21111/ 29 data ivon11,ivon12,ivon13,ivon14,ivon15/-3,-76,-587,-9999,-21111/ 30 data ivon16,ivon17,ivon18,ivon19,ivon20/ 2*119, 2*7, -427/ 31c 32c 33c ********************************************************** 34c 35c a compiler validation system for the fortran language 36c based on specifications as defined in american national standard 37c programming language fortran x3.9-1978, has been developed by the 38c federal cobol compiler testing service. the fortran compiler 39c validation system (fcvs) consists of audit routines, their related 40c data, and an executive system. each audit routine is a fortran 41c program, subprogram or function which includes tests of specific 42c language elements and supporting procedures indicating the result 43c of executing these tests. 44c 45c this particular program/subprogram/function contains features 46c found only in the subset as defined in x3.9-1978. 47c 48c suggestions and comments should be forwarded to - 49c 50c department of the navy 51c federal cobol compiler testing service 52c washington, d.c. 20376 53c 54c ********************************************************** 55c 56c 57c 58c initialization section 59c 60c initialize constants 61c ************** 62c i01 contains the logical unit number for the card reader. 63 i01 = 5 64c i02 contains the logical unit number for the printer. 65 i02 = 6 66c system environment section 67c 68cx010 this card is replaced by contents of fexec x-010 control card. 69c the cx010 card is for overriding the program default i01 = 5 70c (unit number for card reader). 71cx011 this card is replaced by contents of fexec x-011 control card. 72c the cx011 card is for systems which require additional 73c fortran statements for files associated with cx010 above. 74c 75cx020 this card is replaced by contents of fexec x-020 control card. 76c the cx020 card is for overriding the program default i02 = 6 77c (unit number for printer). 78cx021 this card is replaced by contents of fexec x-021 control card. 79c the cx021 card is for systems which require additional 80c fortran statements for files associated with cx020 above. 81c 82 ivpass=0 83 ivfail=0 84 ivdele=0 85 iczero=0 86c 87c write page headers 88 write (i02,90000) 89 write (i02,90001) 90 write (i02,90002) 91 write (i02, 90002) 92 write (i02,90003) 93 write (i02,90002) 94 write (i02,90004) 95 write (i02,90002) 96 write (i02,90011) 97 write (i02,90002) 98 write (i02,90002) 99 write (i02,90005) 100 write (i02,90006) 101 write (i02,90002) 102c test section 103c 104c tests 80 through 84 check the values initialized by the data 105c statement containing ivon01,..., ivon05. 106c 107 801 continue 108 ivtnum = 80 109c 110c **** test 80 **** 111c 112 if (iczero) 30800, 800, 30800 113 800 continue 114 ivcomp = ivon01 115 go to 40800 11630800 ivdele = ivdele + 1 117 write (i02,80003) ivtnum 118 if (iczero) 40800, 811, 40800 11940800 if (ivcomp - 3) 20800, 10800,20800 12010800 ivpass = ivpass + 1 121 write (i02,80001) ivtnum 122 go to 811 12320800 ivfail = ivfail + 1 124 ivcorr = 3 125 write (i02,80004) ivtnum, ivcomp ,ivcorr 126 811 continue 127 ivtnum = 81 128c 129c **** test 81 **** 130c 131 if (iczero) 30810, 810, 30810 132 810 continue 133 ivcomp = ivon02 134 go to 40810 13530810 ivdele = ivdele + 1 136 write (i02,80003) ivtnum 137 if (iczero) 40810, 821, 40810 13840810 if (ivcomp - 76) 20810, 10810, 20810 13910810 ivpass = ivpass + 1 140 write (i02,80001) ivtnum 141 go to 821 14220810 ivfail = ivfail + 1 143 ivcorr = 76 144 write (i02,80004) ivtnum, ivcomp ,ivcorr 145 821 continue 146 ivtnum = 82 147c 148c **** test 82 **** 149c 150 if (iczero) 30820, 820, 30820 151 820 continue 152 ivcomp = ivon03 153 go to 40820 15430820 ivdele = ivdele + 1 155 write (i02,80003) ivtnum 156 if (iczero) 40820, 831, 40820 15740820 if (ivcomp - 587) 20820, 10820, 20820 15810820 ivpass = ivpass + 1 159 write (i02,80001) ivtnum 160 go to 831 16120820 ivfail = ivfail + 1 162 ivcorr = 587 163 write (i02,80004) ivtnum, ivcomp ,ivcorr 164 831 continue 165 ivtnum = 83 166c 167c **** test 83 **** 168c 169 if (iczero) 30830, 830, 30830 170 830 continue 171 ivcomp =ivon04 172 go to 40830 17330830 ivdele = ivdele + 1 174 write (i02,80003) ivtnum 175 if (iczero) 40830, 841, 40830 17640830 if (ivcomp - 9999) 20830, 10830, 20830 17710830 ivpass = ivpass + 1 178 write (i02,80001) ivtnum 179 go to 841 18020830 ivfail = ivfail + 1 181 ivcorr = 9999 182 write (i02,80004) ivtnum, ivcomp ,ivcorr 183 841 continue 184 ivtnum = 84 185c 186c **** test 84 **** 187c 188 if (iczero) 30840, 840, 30840 189 840 continue 190 ivcomp = ivon05 191 go to 40840 19230840 ivdele = ivdele + 1 193 write (i02,80003) ivtnum 194 if (iczero) 40840, 851, 40840 19540840 if (ivcomp - 21111) 20840, 10840, 20840 19610840 ivpass = ivpass + 1 197 write (i02,80001) ivtnum 198 go to 851 19920840 ivfail = ivfail + 1 200 ivcorr = 21111 201 write (i02,80004) ivtnum, ivcomp ,ivcorr 202c 203c tests 85 through 89 check the values initialized by the data 204c statement containing ivon06,...,ivon10. 205c 206 851 continue 207 ivtnum = 85 208c 209c **** test 85 **** 210c 211 if (iczero) 30850, 850, 30850 212 850 continue 213 ivcomp=ivon06 214 go to 40850 21530850 ivdele = ivdele + 1 216 write (i02,80003) ivtnum 217 if (iczero) 40850, 861, 40850 21840850 if (ivcomp - 3) 20850, 10850, 20850 21910850 ivpass = ivpass + 1 220 write (i02,80001) ivtnum 221 go to 861 22220850 ivfail = ivfail + 1 223 ivcorr = 3 224 write (i02,80004) ivtnum, ivcomp ,ivcorr 225 861 continue 226 ivtnum = 86 227c 228c **** test 86 **** 229c 230 if (iczero) 30860, 860, 30860 231 860 continue 232 ivcomp = ivon07 233 go to 40860 23430860 ivdele = ivdele + 1 235 write (i02,80003) ivtnum 236 if (iczero) 40860, 871, 40860 23740860 if (ivcomp - 76) 20860, 10860, 20860 23810860 ivpass = ivpass + 1 239 write (i02,80001) ivtnum 240 go to 871 24120860 ivfail = ivfail + 1 242 ivcorr = 76 243 write (i02,80004) ivtnum, ivcomp ,ivcorr 244 871 continue 245 ivtnum = 87 246c 247c **** test 87 **** 248c 249 if (iczero) 30870, 870, 30870 250 870 continue 251 ivcomp = ivon08 252 go to 40870 25330870 ivdele = ivdele + 1 254 write (i02,80003) ivtnum 255 if (iczero) 40870, 881, 40870 25640870 if (ivcomp - 587) 20870, 10870, 20870 25710870 ivpass = ivpass + 1 258 write (i02,80001) ivtnum 259 go to 881 26020870 ivfail = ivfail + 1 261 ivcorr = 587 262 write (i02,80004) ivtnum, ivcomp ,ivcorr 263 881 continue 264 ivtnum = 88 265c 266c **** test 88 **** 267c 268 if (iczero) 30880, 880, 30880 269 880 continue 270 ivcomp = ivon09 271 go to 40880 27230880 ivdele = ivdele + 1 273 write (i02,80003) ivtnum 274 if (iczero) 40880, 891, 40880 27540880 if (ivcomp - 9999) 20880, 10880, 20880 27610880 ivpass = ivpass + 1 277 write (i02,80001) ivtnum 278 go to 891 27920880 ivfail = ivfail + 1 280 ivcorr = 9999 281 write (i02,80004) ivtnum, ivcomp ,ivcorr 282 891 continue 283 ivtnum = 89 284c 285c **** test 89 **** 286c 287 if (iczero) 30890, 890, 30890 288 890 continue 289 ivcomp = ivon10 290 go to 40890 29130890 ivdele = ivdele + 1 292 write (i02,80003) ivtnum 293 if (iczero) 40890, 901, 40890 29440890 if (ivcomp - 21111) 20890, 10890, 20890 29510890 ivpass = ivpass + 1 296 write (i02,80001) ivtnum 297 go to 901 29820890 ivfail = ivfail + 1 299 ivcorr= 21111 300 write (i02,80004) ivtnum, ivcomp ,ivcorr 301c 302c tests 90 through 94 check the values initialized by the data 303c statement containing ivon11,...,ivon15. 304c 305 901 continue 306 ivtnum = 90 307c 308c **** test 90 **** 309c 310 if (iczero) 30900, 900, 30900 311 900 continue 312 ivcomp = ivon11 313 go to 40900 31430900 ivdele = ivdele + 1 315 write (i02,80003) ivtnum 316 if (iczero) 40900, 911, 40900 31740900 if (ivcomp + 3) 20900, 10900, 20900 31810900 ivpass = ivpass + 1 319 write (i02,80001) ivtnum 320 go to 911 32120900 ivfail = ivfail + 1 322 ivcorr = -3 323 write (i02,80004) ivtnum, ivcomp ,ivcorr 324 911 continue 325 ivtnum = 91 326c 327c **** test 91 **** 328c 329 if (iczero) 30910, 910, 30910 330 910 continue 331 ivcomp = ivon12 332 go to 40910 33330910 ivdele = ivdele + 1 334 write (i02,80003) ivtnum 335 if (iczero) 40910, 921, 40910 33640910 if (ivcomp + 76) 20910, 10910, 20910 33710910 ivpass = ivpass + 1 338 write (i02,80001) ivtnum 339 go to 921 34020910 ivfail = ivfail + 1 341 ivcorr = -76 342 write (i02,80004) ivtnum, ivcomp ,ivcorr 343 921 continue 344 ivtnum = 92 345c 346c **** test 92 **** 347c 348 if (iczero) 30920, 920, 30920 349 920 continue 350 ivcomp= ivon13 351 go to 40920 35230920 ivdele = ivdele + 1 353 write (i02,80003) ivtnum 354 if (iczero) 40920, 931, 40920 35540920 if (ivcomp + 587) 20920, 10920, 20920 35610920 ivpass = ivpass + 1 357 write (i02,80001) ivtnum 358 go to 931 35920920 ivfail = ivfail + 1 360 ivcorr = -587 361 write (i02,80004) ivtnum, ivcomp ,ivcorr 362 931 continue 363 ivtnum = 93 364c 365c **** test 93 **** 366c 367 if (iczero) 30930, 930, 30930 368 930 continue 369 ivcomp = ivon14 370 go to 40930 37130930 ivdele = ivdele + 1 372 write (i02,80003) ivtnum 373 if (iczero) 40930, 941, 40930 37440930 if (ivcomp + 9999) 20930, 10930, 20930 37510930 ivpass = ivpass + 1 376 write (i02,80001) ivtnum 377 go to 941 37820930 ivfail = ivfail + 1 379 ivcorr = -9999 380 write (i02,80004) ivtnum, ivcomp ,ivcorr 381 941 continue 382 ivtnum = 94 383c 384c **** test 94 **** 385c 386 if (iczero) 30940, 940, 30940 387 940 continue 388 ivcomp = ivon15 389 go to 40940 39030940 ivdele = ivdele + 1 391 write (i02,80003) ivtnum 392 if (iczero) 40940, 951, 40940 39340940 if (ivcomp + 21111) 20940, 10940, 20940 39410940 ivpass = ivpass + 1 395 write (i02,80001) ivtnum 396 go to 951 39720940 ivfail = ivfail + 1 398 ivcorr = -21111 399 write (i02,80004) ivtnum, ivcomp ,ivcorr 400c 401c tests 95 through 99 check the values initialized by the data 402c statement containing ivon16,...,ivon20. 403c 404 951 continue 405 ivtnum = 95 406c 407c **** test 95 **** 408c 409 if (iczero) 30950, 950, 30950 410 950 continue 411 ivcomp =ivon16 412 go to 40950 41330950 ivdele = ivdele + 1 414 write (i02,80003) ivtnum 415 if (iczero) 40950, 961, 40950 41640950 if (ivcomp - 119) 20950, 10950, 20950 41710950 ivpass = ivpass + 1 418 write (i02,80001) ivtnum 419 go to 961 42020950 ivfail = ivfail + 1 421 ivcorr = 119 422 write (i02,80004) ivtnum, ivcomp ,ivcorr 423 961 continue 424 ivtnum = 96 425c 426c **** test 96 **** 427c 428 if (iczero) 30960, 960, 30960 429 960 continue 430 ivcomp=ivon17 431 go to 40960 43230960 ivdele = ivdele + 1 433 write (i02,80003) ivtnum 434 if (iczero) 40960, 971, 40960 43540960 if (ivcomp - 119) 20960, 10960, 20960 43610960 ivpass = ivpass + 1 437 write (i02,80001) ivtnum 438 go to 971 43920960 ivfail = ivfail + 1 440 ivcorr = 119 441 write (i02,80004) ivtnum, ivcomp ,ivcorr 442 971 continue 443 ivtnum = 97 444c 445c **** test 97 **** 446c 447 if (iczero) 30970, 970, 30970 448 970 continue 449 ivcomp = ivon18 450 go to 40970 45130970 ivdele = ivdele + 1 452 write (i02,80003) ivtnum 453 if (iczero) 40970, 981, 40970 45440970 if (ivcomp - 7) 20970, 10970, 20970 45510970 ivpass = ivpass + 1 456 write (i02,80001) ivtnum 457 go to 981 45820970 ivfail = ivfail + 1 459 ivcorr = 7 460 write (i02,80004) ivtnum, ivcomp ,ivcorr 461 981 continue 462 ivtnum = 98 463c 464c **** test 98 **** 465c 466 if (iczero) 30980, 980, 30980 467 980 continue 468 ivcomp = ivon19 469 go to 40980 47030980 ivdele = ivdele + 1 471 write (i02,80003) ivtnum 472 if (iczero) 40980, 991, 40980 47340980 if (ivcomp - 7) 20980, 10980, 20980 47410980 ivpass = ivpass + 1 475 write (i02,80001) ivtnum 476 go to 991 47720980 ivfail = ivfail + 1 478 ivcorr = 7 479 write (i02,80004) ivtnum, ivcomp ,ivcorr 480 991 continue 481 ivtnum = 99 482c 483c **** test 99 **** 484c 485 if (iczero) 30990, 990, 30990 486 990 continue 487 ivcomp = ivon20 488 go to 40990 48930990 ivdele = ivdele + 1 490 write (i02,80003) ivtnum 491 if (iczero) 40990, 1001, 40990 49240990 if (ivcomp + 427) 20990,10990,20990 49310990 ivpass = ivpass + 1 494 write (i02,80001) ivtnum 495 go to 1001 49620990 ivfail = ivfail + 1 497 ivcorr = -427 498 write (i02,80004) ivtnum, ivcomp ,ivcorr 499 1001 continue 500c 501c write page footings and run summaries 50299999 continue 503 write (i02,90002) 504 write (i02,90006) 505 write (i02,90002) 506 write (i02,90002) 507 write (i02,90007) 508 write (i02,90002) 509 write (i02,90008) ivfail 510 write (i02,90009) ivpass 511 write (i02,90010) ivdele 512c 513c 514c terminate routine execution 515 stop 516c 517c format statements for page headers 51890000 format (1h1) 51990002 format (1h ) 52090001 format (1h ,10x,34hfortran compiler validation system) 52190003 format (1h ,21x,11hversion 1.0) 52290004 format (1h ,10x,38hfor official use only - copyright 1978) 52390005 format (1h ,5x,4htest,5x,9hpass/fail, 5x,8hcomputed,8x,7hcorrect) 52490006 format (1h ,5x,46h----------------------------------------------) 52590011 format (1h ,18x,17hsubset level test) 526c 527c format statements for run summaries 52890008 format (1h ,15x,i5,19h errors encountered) 52990009 format (1h ,15x,i5,13h tests passed) 53090010 format (1h ,15x,i5,14h tests deleted) 531c 532c format statements for test results 53380001 format (1h ,4x,i5,7x,4hpass) 53480002 format (1h ,4x,i5,7x,4hfail) 53580003 format (1h ,4x,i5,7x,7hdeleted) 53680004 format (1h ,4x,i5,7x,4hfail,10x,i6,9x,i6) 53780005 format (1h ,4x,i5,7x,4hfail,4x,e12.5,3x,e12.5) 538c 53990007 format (1h ,20x,20hend of program fm007) 540 end 541