sword@vu-vlsi.UUCP (Ronin) (07/23/87)
A question. I was reading some advertising material from a past issue of PC TECH Journal which was stating that Microsoft FORTRAN '77 compiler, their C compiler and their Pascal compiler were all now compatible at the subroutine level. Do I understand this properly to mean that a c subroutine compiled in C to an .OBJ file can be called by FORTRAN? And if so, how does this affect the way arrays are put in memory (recall the disscussion that the ANSI FORTRAN standard says that FORTRAN stores its arrays in column major order and Pascal/C stores them in row major order) [actually I forget which is which, but I know FORTRAN and Pascal/C are opposite]. Does Microsoft FORTRAN 4.0 not follow the ANSI standard now, concerning arrays? ..lar ----- Larry Esmonde, Director of SWORD (Students Working On R & D) Computer Science Dept, Villanova Univ. Villanova, Pa. 19085 UUCP: {bpa,cbmvax,psuvax1}!vu-vlsi!sword / BITNET: sword@vuvaxcom
garrett@udel.EDU (Joel Garrett) (07/24/87)
In article <998@vu-vlsi.UUCP>, sword@vu-vlsi.UUCP (Ronin) writes: > > A question. I was reading some advertising material from a > past issue of PC TECH Journal which was stating that > Microsoft FORTRAN '77 compiler, their C compiler and their > Pascal compiler were all now compatible at the subroutine > level. > > Do I understand this properly to mean that a c subroutine > compiled in C to an .OBJ file can be called by FORTRAN? Well, it isn't always straightforward, but yes, there is support for interlanguage calling. Just as in any other system that supports this, the MS documentation reminds the programmer of the things that have to be kept in mind for this kind of thing (such as the different ordering and numbering of multi-dimensional arrays used by the different languages, string formats, but the MS languages have extensions to them (especially in data types) to make this a lot easier. (ie you can declare something as a C string [null-terminated] in a FORTRAN program) > Does Microsoft FORTRAN 4.0 not follow the ANSI standard now, > concerning arrays? Not sure what you're asking here. If you're talking about the pending 8x standard, I doubt it. Otherwise, the interlanguage programming documentation that has come with FORTRAN since 3.? has stated that the array ordering for MS FORTRAN is opposite to that of Pascal and C (I forget the order, too - don't want to start that discussion again here :-) > ..lar > > Larry Esmonde, Director of SWORD (Students Working On R & D) > Computer Science Dept, Villanova Univ. > Villanova, Pa. 19085 > UUCP: {bpa,cbmvax,psuvax1}!vu-vlsi!sword / BITNET: sword@vuvaxcom Joel Joel Garrett, Research Associate Center for Composite Materials, University of Delaware Newark, De. 19716 ARPA: garrett@udel-ccm.arpa OR garrett@udel.edu