- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I saw some people using => to assign value to a variable, and I couldn't find how => works, anyone can give me some reference of how => works
Thanks
Youwei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is called "pointer assignment". A variable with POINTER attribute may be initially assigned NULL() or may be left undefined. Before that variable can be used, it should be pointer-assigned or allocated. See https://software.intel.com/en-us/node/525487#AC3C6AB9-78CF-402B-9846-3481CCD786D3 .
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is called "pointer assignment". A variable with POINTER attribute may be initially assigned NULL() or may be left undefined. Before that variable can be used, it should be pointer-assigned or allocated. See https://software.intel.com/en-us/node/525487#AC3C6AB9-78CF-402B-9846-3481CCD786D3 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additional information that you may find useful in the future.
In C a pointer is thought of as a intptr_t sized value holding the address of something pointed to (with type).
In Fortran this is also the case for a scalar or user defined type. However, Fortran also permits pointers to point to sub-sections of arrays such as a pointer to a row or a column or some otherwise peculiar (to C programmers) subsections of an array such as every 3rd element. In the case of the sub-section, the pointer is a intptr_t sized value holding the address of an array descriptor and not directly to the block of data, primarily because the data is not in a contiguous block.
The reason for me mentioning this is to forewarn you that C and Fortran pointers are not necessarily interchangeable.
Jim Dempsey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page