- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I posted this question yesterday. But I cant seem to find it. Here it goes again.
I am stumped by a problem. Any help, suggestions, etc will be appreciated.
I am currently running Compaq Visual Fortran 6.6
In a module, Ihave created an array using the following:
type variables
integer :: m(150)
real :: d(600)
end type variables
integer :: m(150)
real :: d(600)
end type variables
type(variables), target :: orig
Next, I associate array elements with pointers using:
integer, pointer :: &
iname1, iname2, iname3, ......
Then, i have a subroutine which associates the pointer name witha specific array location:
iname1 => orig%m(01)
iname2 => orig%m(02)
iname3 => orig%m(03), and so on.
Then i have a subroutine which fills the variables with values:
iname1 = 10
iname2 = 12
iname3 = iname1+iname2
No compile errors, no link errors.
Now here is my problem:
When i first startthe debugger, I use the watch window to examine the values of my variables. Some of the variables will display "Undefined pointer/array" while others will display "undefined variable name". Further, I cannot discern a pattern.
For example:
name value
--------- ---------
iname1 undefined pointer/array
iname2 undefined variable iname2
iname3 undefined pointer/array
Then, after i fill the variables with values:
iname1 10
iname2 undefined variable iname2
iname3 22
If instead, I desplay the array elements
orig%m(01) 10
orig%m(02) 12
orig%m(03) 22
What is going on here?
How do I convince CVF that I all of the names i assign are pointers, and not undefined variables?? One would think that saying "integer, pointer :: iname2" would be sufficient?
What am I doing wrong?
Any help will be appreciated.
Link Copied
0 Replies

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