Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Deepcopy function in Fortran

SKB__ALD
Beginner
1,626 Views

Hi,

Is there a function in fortran that is similar to Deepcopy in Python?

Thanks!

SKBALD

0 Kudos
2 Replies
IanH
Honored Contributor III
1,626 Views

It depends on what you are copying.

For objects that do not have pointer components, ordinary assignment performs a deep copy.

0 Kudos
Arjen_Markus
Honored Contributor II
1,626 Views

For objects that do have pointer components, you can define an appropriate assignment subroutine. Mind you: what such a routine should do depends very much on the intended use. For instance: if you have a circular buffer that is implemented using a linked list that points back into itself, such an assignment might be tricky.

0 Kudos
Reply