Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ucsd!ucsdhub!esosun!seismo!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.fortran Subject: Re: Should I convert FORTRAN code to C? Message-ID: <7577@boring.cwi.nl> Date: 5 Jul 88 00:34:00 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <20531@beta.lanl.gov> <12302@mimsy.UUCP> Organization: CWI, Amsterdam Lines: 20 In article <12302@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: > Again, this is convenient. Unfortunately, it is also not standard, so > it cannot be used in general. If one wants a flat array (because the > compiler is unable to vectorise the row-vector version, perhaps), one > must use the inconvenient access version, a[j*m + i] (with either the > flat allocation or the combined flat-plus-row-vector allocation). Se essentially there are two ways to do the thing in C. Now what if I am writing a portable library, should I make two versions (one for vector machines and the other for smart compilers)? This is a bit ridiculous, so we will get libraries (like IMSL, NAG and packages as LINPACK etc.) in only one version. And if the programmer started with the other version, but found he needed a library routine, he is in trouble. The big point is: you are not going to write a complete numerical system from scratch, so you have no options; it is the library that dictates the option (which is most likeley a flat array). -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax