main module address use TEXTIO declare a: static integer initially 5 b: integer initially 3 pi is pointer integer p: pi t: integer array_type is array[1..4] of integer ar: array_type initially table array_type(6,7,8,9) structure_type is structure i: integer j: integer endstructure s: static structure_type initially structure_type(i: 10, j: 11) enddeclare // Get address of static integer t := integer(addressof(a)) out_integer (tty, t, "Address of a: ", true) // Point to address to get value p := force pi(t) out_integer (tty, p@, "Dereference a: ", true) // Get address of dynamic integer t := integer(addressof(b)) out_integer (tty, t, "Address of b: ", true) // Point to address to get value p := force pi(t) out_integer (tty, p@, "Dereference b: ", true) // Get address of dynamic array element t := integer(addressof(ar[b])) out_integer (tty, t, "Address of ar[b]: ", true) // Point to address to get value p := force pi(t) out_integer (tty, p@, "Dereference ar[3]: ", true) // Get address of static structure field t := integer(addressof(s.j)) out_integer (tty, t, "Address of s.j: ", true) // Point to address to get value p := force pi(t) out_integer (tty, p@, "Dereference s.j: ", true) endmodule