Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.f77 Subject: Re: calling _printf() from f77 Message-ID: <5474@brl-tgr.ARPA> Date: Fri, 26-Oct-84 19:10:31 EST Article-I.D.: brl-tgr.5474 Posted: Fri Oct 26 19:10:31 1984 Date-Received: Sun, 28-Oct-84 05:59:10 EST References: <146@uwai.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 12 > Does anyone out there know how to call _printf() from f77 and the hazards > involved with this? As has been pointed out recently, mixing Fortran and C I/O is hazardous. The file descriptors that the Fortran run-time support has squirreled away are not directly accessible from Fortran, and there is no promise (for example) that LUN 6 is associated with UNIX file descriptor 1 (although it usually will be if you haven't been doing anything fancy). For something as simple as printf(), you can probably get away with it. You will need to write a small interface that is callable from Fortran and that passes its parameters on to printf(). Watch out for buffering!