- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there a function in fortran that is similar to Deepcopy in Python?
Thanks!
SKBALD
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on what you are copying.
For objects that do not have pointer components, ordinary assignment performs a deep copy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page