K & R v1
If you look at the C programming language, the first edition (1978) uses the term "indirectness".
Examples
2.12 Priority and order of assessment
[...]
Chapter 5 discusses * (indirection) and and (address).
7.2 Unary operators
[...]
The unary operator * means an indirect expression: the expression must be a pointer, and the result is an lvalue that refers to the object that the expression points to.
It is also specified in INDEX, for example,
* indirection operator 89, 187
Longer Excerpt from Section 5.1
5.1 Pointers and addresses
Since the pointer contains the address of the object, you can access the object "indirectly" through the pointer. Suppose x
is a variable, for example int
, and that px
is a pointer created in some other unspecified way. The unary operator c gives the address of the object, so the statement
px = &x;
assigns the address x
variable px; px
px; px
, which is now called "specify" x
. The and operator can only be applied to variables and array elements; constructs such as &(x+1 )
and &3
are illegal. It is also illegal to access a variable register.
The unary operator *
considers its operand as an address from the final destination and refers to this address to retrieve the contents. so if y
is alos a int
,
y = *px;
assigns y
contents that px
points to. So sequence
px = &x; y = *px;
assigns the same y value as
y = x;
K & R v2
In the second edition, the term "dereferencing" appears.
5.1 Pointers and addresses
The unary operator * is the operator of an indirect or dereference operation; when applied to a pointer, it refers to the object that the pointer points to. Suppose x and y are integers, and ip is a pointer to an int. This artificial sequence shows how to declare a pointer and how to use, and *:
[...]
Previous use
This term, however, is ("much") older, as can be seen, for example,
A Survey of Some Issues Concerning Abstract Data Types , 1974. For example, pp24 / 25. It is said here in connection with ALGOL 68, PASCAL, SIMULA 67.
The mechanism by which pointers are translated into values in a language known as “dereferencing,” a form of coercion (discussed below). Consider the statement
p := q;
Depending on the types p and q, there are several possible interpretations.
Let '@' be the dereference operator (i.e., if p points to j, then @p matches j) and '#' is the reference operation (i.e. if p points to j, then p is the same as #j). The following table indicates the possible actions that may be required to complete the assignment:
| | type of p | | t ref t ref ref t . . . | --------------------------------------------------------- | t | p←qp←#qp←##q | @p←q @p←
[...]
Chasing
There are several other examples of its use. Exactly where and when it was invented, I can not find though (at least for now). (The 1974 article is at least interesting.)
For fun, this can also often be useful for viewing mailing lists such as net.unix-wizards. Example from Peter Lamb at Melbourne Uni (11/28/83):
The dereferencing of NULL pointers is another example of idiots who write “portable” code, assuming, however, that their machine is the only one it will ever run on: the same people who developed cpio with binary headers. Even on VAX, dereferencing NULL will give you trash: of course * (char *) NULL and * (short *) NULL will return you 0, but * (int *) NULL will give you 1024528128 !!!!.
[...]
Ed1. Adding
Not the mention of "dereferencing," but still; Interesting is Richie: C ✝ Language Development
The term "indirectness" is also used here - but / and / etc. the connection between languages is somewhat detailed. The use of this term is thus interesting from the point of view of, for example, such as the 1974 mentioned above.
As an example of indirectness as a concept and syntax, for example, pp. 12 ev.
A syntax accident contributed to the perceived complexity of the language. The indirection operator, written in C, is syntactically a unary prefix operator, as in BCPL and B. This works well in simple expressions, but in more complex cases, parentheses are required to direct the parsing.
[...]
There are two effects. Most importantly, C has a relatively rich set of ways to describe types (compared to, say, Pascal). For example, language declarations such as C-Algol 68 describe objects that are difficult to understand, simply because the objects themselves are complex. The second effect is related to syntax details. Statements in C should be read in the inside-out style, which many people find difficult to understand [Anderson 80].
In this regard, ANSI C89 is probably also worth mentioning and mentions:
3.1.2.5 Types
A pointer to void cannot be dereferenced, although such a pointer can be converted to a regular type of pointer that can be dereferenced.
Among the invalid values for dereferencing a pointer by a unary operator * are a null pointer, an address, an incorrectly selected object for the type that the object points to, or the address of an object that has automatic storage time when executing the block in which the declared object is located and all closed blocks are completed.
(Now I need to re-read some of these documents.)