Zum Hauptinhalt springen

Fortran-Zeiger

Lilya 黑静美Original...Weniger als eine MinuteProgrammierungSyntaxmarkdown

Fortran-Zeiger

program pointerExample
implicit none

   integer, pointer :: p1
   integer, target :: t1 
   
   p1=>t1
   p1 = 1
   
   Print *, p1
   Print *, t1
   
   p1 = p1 + 4
   
   Print *, p1
   Print *, t1
   
   t1 = 8
   
   Print *, p1
   Print *, t1
   
end program pointerExample
Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v3.1.3