Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnNichols
Valued Contributor I
104 Views

1988 Code

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