Re: Address of a fortran variable
- From: "John H. Lindsay" <jlin_DELETE_THIS_SPAM_ZOT_dsay@xxxxxxxxxxxx>
- Date: Fri, 17 Oct 2008 13:40:20 -0400
David Flower wrote:
......
Many compilers support LOC, where LOC(X) returns the address of X. It......
is not standard, despite having been around in FORTRAN for a very long
time.
True, and of those, several F77's &c. also had ALOC(X), usually a second
name for the same entry point in an (external) assembly-coded library
routine to avoid a few 'problems' with assumed data type. The one I was
very familiar with, the code (the same entry point and instructions for
both LOC and ALOC) loaded the address of the X into both the register
where INTEGER and LOGICAL results were returned and into another
register where REAL, dp and part of COMPLEX & dp COMPLEX results were
returned, so that no matter what data types were specified for LOC and
ALOC, reasonable results were returned.
Ah, history! ATB,
John.
.
- References:
- Address of a fortran variable
- From: Sibi
- Re: Address of a fortran variable
- From: David Flower
- Address of a fortran variable
- Prev by Date: Re: chop the space after a string
- Next by Date: Re: Address of a fortran variable
- Previous by thread: Re: Address of a fortran variable
- Next by thread: How to read an ANSIC file like this?
- Index(es):
Relevant Pages
|