Xref: utzoo unix-pc.general:7273 comp.sys.att:11511 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!olivea!apple!portal!cup.portal.com!thad From: thad@cup.portal.com (Thad P Floryan) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: Fortran for 3B1 needed Message-ID: <38032@cup.portal.com> Date: 14 Jan 91 20:23:08 GMT References: <6533@mace.cc.purdue.edu> <723@skeeve.UUCP> <1991Jan11.172958.16959@athena.mit.edu> <1991Jan14.160257.6838@sci.ccny.cuny.edu> Organization: The Portal System (TM) Lines: 61 jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) in <1991Jan14.160257.6838@sci.ccny.cuny.edu> writes: Re:f2c The package comes with it's own libraries. Really, the only thing you need is to put the libs in the appropriate place. It holds the routines called main, f_init, and f_exit (the routines needed to make f77 happy in a C universe). There are also a few other routines, I forget exactly which ones at this point. But it works. Re:SVS If only the Fortran that does exist (SVS Fortran) would link with C, but it doesn't (without assembly wrappers) :-( Oh? Then kindly explain why the following works just fine using SVS Fortran: thadlabs ksh 24989/24990> cat foo.for INTEGER PART1, PART2, PART3 PART1 = -1 PART2 = 31 C PART3 = IAND(PART1,PART2) WRITE(*,100) PART1,PART2,PART3 100 FORMAT(I13,' .AND. ',I13,' = ',I13/) C PART3 = IOR(PART1,PART2) WRITE(*,200) PART1,PART2,PART3 200 FORMAT(I13,' .OR. ',I13,' = ',I13/) C PART3 = IXOR(PART1,PART2) WRITE(*,300) PART1,PART2,PART3 300 FORMAT(I13,' .XOR. ',I13,' = ',I13/) END thadlabs ksh 24989/24990> cat bitsub.c int IAND(arg1, arg2) int *arg1, *arg2; { return(*arg1 & *arg2); } int IOR(arg1, arg2) int *arg1, *arg2; { return(*arg1 | *arg2); } int IXOR(arg1, arg2) int *arg1, *arg2; { return(*arg1 ^ *arg2); } thadlabs ksh 24989/24990> cat doit.sh fortran foo.for bitsub.o -o foo thadlabs ksh 24989/24990> ./foo -1 .AND. 31 = 31 -1 .OR. 31 = -1 -1 .XOR. 31 = -32 thadlabs ksh 24989/24990> Thad Floryan [ thad@cup.portal.com ]