(j3.2006) Is a pointer a data object?
Cohen Malcolm
malcolm
Wed Jan 27 00:37:59 EST 2016
>Is a pointer a data object,
A data pointer is a data object. A procedure pointer is a procedure.
(1) A data pointer is defined to be a "data entity with the POINTER
attribute";
(2) a variable is defined to be a "data entity that can be defined and
redefined during execution of a program";
(3) and finally, a "data object" is defined to be a "variable" (or some
other stuff).
> or is only its target (if it is associated) a data object?
>
>5.3.1.4
There is no 5.3.1.4, maybe a typo for 5.5.14.
> suggests it's not a data object because it claims a pointer can
>be associated with different data objects during execution.
Oh good, so dummy data objects are not data objects either, since they can
be associated with different data objects during execution. Nice to know.
> Pointers
>cannot be associated with pointers -- only with their targets.
Untrue. A data pointer can only be pointer-associated with a data object
that has the TARGET attribute, which rules out lots of things, including all
constants and all pointers.
But a pointer can potentially be argument-associated,
inheritance-associated, host-associated, or use-associated with another
pointer.
However, what this point has to do with the question is at best unclear.
>If a pointer is not a data object
Since we defined it to be a data object, we need not worry about that.
>Also, data entity and data object are circularly defined:
Well, that is careless.
>data object (1.3.45) -> variable (1.3.54) -> data entity (1.3.44) ->
>data object (1.3.45).
>
>Is that a problem?
No. Variable could be defined as "data object that ...", which is even more
tightly circular, but anyway it is the "can be defined" etc. bit of the
definition which is the important bit.
Cheers,
--
........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list