Remove lines from a file: Difference between revisions

m
Line 592:
 
 
Formulating error messages is tedious, in the absence of a function such as IFMT(n) to be used in <code>CALL CROAK("First record must be positive, not "//IFMT(IST))</code> A more accomplished programme would worry about running out of disc space (signalled by anthe taking of the "END"=''label'' option in a WRITE statement) and I/O errors along the way using the ERR=''label'' option, but it is difficult to devise recovery schemes for unexpected errors. Similarly, the OPEN statements are at risk of confronting a file that is available for READ, but not for WRITE. It would help in organising all this if OPEN(...) was a function, but instead one can refer to the recondite IOSTAT error codes, possibly with assistance as with
<lang Fortran>
CHARACTER*42 FUNCTION ERRORWORDS(IT) !Look for an explanation. One day, the system may offer coherent messages.
1,220

edits