Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

1988 Code

JohnNichols
Valued Contributor III
420 Views
301 Write(*,300)
300 Format(/'---------------------------------------------------------',//'          Menu',//&
        '             Single Run                      ::   1',/,&
        '             Halt Program                    ::   2',//,&
        '                Selection :: ',\)

    READ(*,*,ERR=11)num
    if(num .eq. 1) then
        NL = 1
    endif
    if(num .eq. 2) then
        STOP 'Program completed'
    endif


    if(num .lt. 1 .or. num .gt. 2) then
        Write(*,302)num
302     Format(/'             Error in input',/'             Number must be valid :: ',I4)
        goto 301
    endif

11  WRITE (*, 180)
180 Format(4x,/'              Enter the data file name: ',\)
    READ(*,30,ERR=11)zFILE1
30  FORMAT((A))

 

I have used this code since 1988 and I just found an error in the code - never noticed it before.  

0 Kudos
0 Replies
Reply