Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

Debug.Print fortran array lengths?

I already know it is possible to use the command window in Visual Studio coupled with Intel Visual Fortran to do many things. For example:

Debug.Print VariableName
Debug.AddWatch VariableName

However is it possible also to print out the length of an array? I already tried

Debug.Print ArrayName.Length

But I got an error saying

'' is not a structure

Is this operation possible in Intel Visual Fortran? Also what other neat tricks exist through the command window that you guys like to use?

0 Kudos
2 Replies
Highlighted
2 Views

Indirectly you can open Watch

Indirectly you can open Watch window and enter the array name. The Value should show the bounds.

However, VS has an upper limit on the number of array cells to display (on the order of 1000). If you think the array (watch)  is not reaching the end of the array, you can set a watch to some number slightly less than the upper limit displayed for the array, to end

array     ! assume this shows (1:1000)
array(999:)   ! this may show 999:1998
...

Unfortunately you cannot display UBOUND(array)

Jim Dempsey

0 Kudos
Highlighted
Beginner
2 Views

I would like to explore this

I would like to explore this again. There has got to be an easier way to get at these array dimensions while debugging. I'd like to talk about the Fortran array itself. How does MS Visual Studio deal with this? Does it consider it as a native array or does it create some sort of proxy object only representing the Fortran array? What is the relationship between the command window and Intel Visual Fortran?

 

0 Kudos