Print

Print


Peter,

On 2005 Apr 15 , at 11.04, Peter W. Draper wrote:

> thanks, I've changed SST to use this test and it now seems to be
> working
> under Tru64. I've not added this to CNF (or in fact CHR which I
> temporarily did) as it's not clear that the compiler or compiler
> options
> will be the same when building say SST as when CNF/CHR were built, so I
> decided the test should be done locally.

There's a similar problem in FIO, where the multiple fio1_serr.f*
modules contain Fortran error codes for specific compilers, though the
files are actually included depending on the platform.  Even if they
_were_ switched based on the compiler -- fiddly, but I'm sure possible
-- this would be little better since, as with this backslash issue and
your brief change to CHR, there would be no guarantee that the compiler
would used when using the library would be the same one that the
library was configured with.

There are two other possibilities.  One would be to create a function
which returned a backslash, since that would be fixed when the library
containing it was compiled.  The other would be to something tricksy
with an integer*1 holding 0x5c, and an EQUIVALENCE with a character
constant.    Too grim?

See you,

Norman


--
----------------------------------------------------------------------
Norman Gray  :  Physics & Astronomy, Glasgow University, UK
http://www.astro.gla.ac.uk/users/norman/  :  www.starlink.ac.uk