Pointers in Fortran are aliases for their targets, much like
references in C++. You reference the data without any special
operators. The pointer-ness in Fortran is an attribute. pointer-ness
in C/C++ is part of its data type. reference-ness in C++ is kind of
like an attribute. A major difference between Fortran pointers and
C++ references is that Fortran pointers are retargetable; C++
references can only be initialized. C/C++ pointers are
"retargetable", but that's because pointer-ness is part of the data
type, so "retargetting" is paramount to value assignment (as opposed
to Fortran's pointer "assignment"/targetting). Fortran also has array
pointers; C++ only has scalar references.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|