$TypedAddress Compiler Directive
When $TypedAddress
is enabled, the @
operator returns a typed address of a variable or subroutine. The
default is that the @
operator returns a generic
Pointer
type. Even when
$TypedAddress
is enabled, assignments of a typed
pointer to the Pointer
type are still allowed as
are assignments from Pointer
to a specific pointer
type.
Enable $TypedAddress
because it encourages good
programming practices and careful use of pointers. Unsafe pointer
assignments can be caught at compiler
time.
The Addr
function always returns an untyped
Pointer
. If you enable
$TypedAddress
, use Addr
when
you need an untyped pointer and use @
when you
want a type-safe address.