stever@tekgen.UUCP (05/23/86)
Does anyone know a way to get around the limit of 20 unit numbers in UNIX 4.2 FORTRAN? I understand that C allows 31 or so. --thanks in advance Steve Rogers ....tektronix!tekgen!stever
david@ztivax.UUCP (06/16/86)
>stever@tekgen >Does anyone know a way to get around the limit of 20 >unit numbers in UNIX 4.2 FORTRAN? > >I understand that C allows 31 or so. Nope, that is a function of the file descriptors you can have open in UNIX 4.2: 0-19 (maybe 1-20 in f77, i dunno). (flame me not - this is NOT some magic UNIX standard limit, , but it IS a common implementation limit, and its for all the UNIXes I have seen). If you want lots of files open, use FILE pointers (is there a way to get them from f77? in C we use fopen() instead of open() ).
david@ztivax.UUCP (06/16/86)
Ooops! I just checked the sources, and fopen() DOES still use descriptors (it actually calls open()), so you can still only open 20 files on your vanilla 4.2 or sysV implementation.
levy@ttrdc.UUCP (Daniel R. Levy) (06/21/86)
In article <8300002@ztivax.UUCP>, david@ztivax.UUCP writes: >Ooops! I just checked the sources, and fopen() DOES still use >descriptors (it actually calls open()), so you can still only open 20 >files on your vanilla 4.2 or sysV implementation. I would HOPE that fopen() still uses descriptors (the OS provides no other way to stuff input into a file, except maybe mucking with the device con- taining the files [look ma, several files, one descriptor, system crash!] :-)). No need to "check the sources" to know THAT! -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, vax135}!ttrdc!levy