> the function has to return an INTEGER, as that's what all the variables
> that use its result expect.
Yep.
> If we wanted a 64 bit friendly solution, we would indeed need to
> change this to return INTEGER*8, along with DYN_INCREMENT and
> DSA_TYPESIZE (and maybe more?) and change all the references to them
> (and uses of the result) to use INTEGER*8. I stopped at that thought
> and decided throwing DYN_ELEMENT in the bin and using %VAL/CNF_PVAL
> was a better idea.
So if astronomers continue to programme with DYN_ELEMENT instead of
%VAL/CNF_PVAL, they'll come unstuck on 64-bit machines, unless they
switch the 32-bit compiler option. That's fine with me.
I made a start converting the many DYN_ELEMENT calls to %VAL/CNF_PVAL,
and changing some private workspace calls to invoke DSA_GET_WORK_ARRAY
to accept normal pointers instead of elements in DYN_ELEMENT. In some
places I did this sometimes multiple times rather than doing address
arithmetic in the application code. The TWODSPEC code will need
changing so its dynamic elements passed through a COMMON block are
traditional pointers.
Testing this stuff is a concern. Does anyone have a test suite/data for
TWODSPEC? There is a SPECDRE demo from an AstroFest a decade ago that
might be adapted to exercise its modified code, now part of Figaro.
> > We use DOUBLE PRECISION rather than REAL*8 and so on (cf. SGP/16 Rule
> > 2.1). Is there no generic term for INTEGER*8?
>
> As Mark said, nope, INTEGER*8 is an extension.
Yes I know there's nothing in Fortran 77, just thought that there might
have been a modern extension in keeping with the DOUBLE PRECISION over
REAL*8.
> Err, thanks. Since we probably want some backwards compatibility, we'll
> need a new function to do this job. I'll have a closer look at this
> (sometime soon).
Well I'm sure you prefer that over changing hundreds of DYNAMIC_MEMORY
calls and other related changes. There were more than I thought because
some people wrote lower case Fortran code.
> > Meanwhile the %VAL changes are 85% done.
Completed those on Friday, then started on the DYNAMIC_MEM
modifications. No promises that
Malcolm
|