- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have these declarations:
real(4) , target :: scriptL1(0:361,-361:361,50)
real(4), pointer:: scriptL1p(:,:)
real(4), pointer:: scriptL1p(:,:)
(much) later in the routine I have
scriptL1p => scriptL1(0:361,-361:361,k)
No errors/warnings on compiling and linking. When the code is excuted I get an error flagging the second subscript in the pointer array as < 1 which (it says) is the minium value. Negative values are possible but my pointer assignment is evidently not picking that up. I am trying to point to 2D pages in a 3D array, the second subscript of which ranges into the negative. It isn't clear why I can't do this.
Thanks for any help,
David
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David
The compiler is conforming to the standard. When you specify the the section subscripts, the pointer bounds (on each dimension) will be 1 and the appropriate upper bound. You can find out the bounds using LBOUND and UBOUND. Thus, you will get, LBOUND(scriptL1p,1) = 1,UBOUND(scriptL1p,1) = 362, and LBOUND(scriptL1p,2) = 1, UBOUND(scriptL1p,2) = 723.
Please see my post made earlier today. (http://software.intel.com/en-us/forums/showthread.php?t=67515). I think, the compiler currently cannot handle possible re-mapping of the bounds as required by the standard.
Abhi
p.s. good to see someone from "colorado.edu" :)
The compiler is conforming to the standard. When you specify the the section subscripts, the pointer bounds (on each dimension) will be 1 and the appropriate upper bound. You can find out the bounds using LBOUND and UBOUND. Thus, you will get, LBOUND(scriptL1p,1) = 1,UBOUND(scriptL1p,1) = 362, and LBOUND(scriptL1p,2) = 1, UBOUND(scriptL1p,2) = 723.
Please see my post made earlier today. (http://software.intel.com/en-us/forums/showthread.php?t=67515). I think, the compiler currently cannot handle possible re-mapping of the bounds as required by the standard.
Abhi
p.s. good to see someone from "colorado.edu" :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David, Abhi,
You might be able to use FOR_DESCRIPTOR_ASSIGN to construct the pointer you desire (non-1 based lower bounds).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Abhi & Jim,
Thanks! Both for pointers to The Standard and toFOR_DESCRIPTOR_ASSIGN. The latter gets me what I originally wanted.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Abhi is correct that we do not yet implement the bounds remapping feature of pointer assignment from F2003.

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