In addition to the standard assignment operator (=), Prism supports the new Fortran 90 pointer assignment operator =>. For example:
program pnode type node integer x,y type(node), pointer :: next end type node type(node), target :: n1,n2,n3 type(node), pointer :: pn1, pn2 ... pn1 => n1 pn2 => n2 i = 0 end
The following examples assume that a breakpoint has been set at the last statement, i = 0, and show how Prism supports Fortran 90 pointers:
print pn1 - Prints the value pointed to by pn1, in this case n1.
print pn1%x - Prints the value of the member x in the object pointed to by pn1 (in this case n1%x).
assign pn1%x = 3 - Assigns n1%x = 3.
assign pn1=n3 - Assigns n3 to the value pointed to by pn1 (this has the same effect as assign n1=n3).
assign pn1=>n3 - Makes pn1 point to n3.
assign pn1=>pn2 - Makes pn1 point to the same object as pn2.