 |
Scalar |
Used to represent fixed-size data objects. They could be individual
such as pointers and integers or composite such as arrays. |
x=123 (scalar variable x of type integer)
|
Associative array |
Used to represent collections of data elements that can be retrieved
by specifying a key. There is no predefined limit of the number
of elements. Elements can be indexed by any tuple, and elements
are not stored in preallocated consecutive storage locations. |
a[123,“hello”] = 56 (associative array a with
key, [int, string])
|
Thread-Local |
Used to declare variable storage that is local to each operating
system thread. |
self->x= 45 (thread-local variable x of type integer)
|
Clause-Local |
This variable is active for the lifetime of a given probe clause and
its storage is reused for each D program clause. |
this->c='D' (character clause-local variable c)
|
Built-in |
All these variables are scalar global variables. |
-- |
External |
The backquote character (`) is a scoping operator for accessing variables that are defined in the OS and not in your D program. |
`kmem_flags (accessing a C variable in the kernel source code)
|