Previous: iopnam Up: ../plot79_i.html Next: iopopn
INTEGER FUNCTION IOPOPF (FNAME,LENFNM,MODEOP) C$ (Open File by Name or Number) C$ This routine is called to open a file by name or number. C$ If the token following the command keyword is numeric, it C$ is taken to be an integer to be used as a FORTRAN unit C$ number for further input, which is a portable usage C$ (subject to CDC's requirement of declaration of all files C$ in the PROGRAM statement of the main program). If it is C$ alphanumeric, then it is assumed to be a system-dependent C$ file name which must be associated with a FORTRAN unit C$ number created for the purpose. C$ C$ The function value returned for a successful open is a C$ valid FORTRAN unit number greater than 0, and that number C$ has been pushed onto the top of the file stack in COMMON. C$ If the open fails, then -1 is returned. C$ C$ The code section which actually calls for an OPEN command C$ to be executed is thus system-dependent, and may not be C$ supportable in all environments. It is localized entirely C$ in routine IOPOPN. It is useful to provide that support C$ when the host permits it (as all FORTRAN 77 hosts must). C$ The search for a usable file number should be completely C$ portable, subject perhaps to the largest and smallest C$ FORTRAN unit numbers defined as MINUNO and MAXUNO below. C$ If runtime file opening by name is not possible, IOPOPN can C$ simply be a dummy routine which returns the value -1. C$ C$ (28-JUN-82)