mirror of
https://github.com/VictorEijkhout/TheArtOfHPC_vol3_cppf08programming.git
synced 2026-01-24 22:44:48 +09:00
26 lines
568 B
Fortran
26 lines
568 B
Fortran
!****************************************************************
|
|
!***
|
|
!*** This file belongs with the course
|
|
!*** Introduction to Scientific Programming in C++/Fortran2003
|
|
!*** copyright 2017-2021 Victor Eijkhout eijkhout@tacc.utexas.edu
|
|
!***
|
|
!*** allocptr.F90 : allocate the pointer object
|
|
!***
|
|
!****************************************************************
|
|
|
|
|
|
Program PointAtReal
|
|
|
|
implicit none
|
|
|
|
!!codesnippet fptralloc
|
|
Real,pointer :: x_ptr,y_ptr
|
|
allocate(x_ptr)
|
|
y_ptr => x_ptr
|
|
x_ptr = 6
|
|
print *,y_ptr
|
|
!!codesnippet end
|
|
|
|
end Program PointAtReal
|
|
|