Microsoft KB Archive/37548

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:55, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Using CodeView to Examine FORTRAN Arrays

Article ID: 37548

Article Last Modified on 12/1/2003



APPLIES TO

  • Microsoft CodeView 3.0
  • Microsoft CodeView 3.0
  • Microsoft CodeView 3.0
  • Microsoft CodeView 4.0
  • Microsoft CodeView 4.01
  • Microsoft CodeView 4.01
  • Microsoft CodeView 4.1
  • Microsoft CodeView 3.0
  • Microsoft CodeView 4.1
  • Microsoft CodeView 4.1
  • Microsoft CodeView 4.1
  • Microsoft CodeView 3.0
  • Microsoft CodeView 3.05
  • Microsoft CodeView 3.06
  • Microsoft CodeView 3.07
  • Microsoft CodeView 4.0
  • Microsoft CodeView 4.01
  • Microsoft CodeView 4.1



This article was previously published under Q37548

SUMMARY

You can use CodeView to display a single element of a Fortran array using ?arrayname(x,x,x), where "arrayname" consists of the first six characters of the array name and "(x,x,x)" must be a valid cell in the array.

There is no way to display more than one cell of the array using this command. To display many cells, you must do a memory dump of the addresses where the array is stored or use the memory window in CodeView versions 3.0 and later.

MORE INFORMATION

FORTRAN stores array elements in column-major order. Use the following formula to determine the address where any cell (i,j,k) is stored, where Max_Row is the maximum i possible and Max_Col is the maximum j possible:

    MemAddr = start_addr+(size of elements)*
                     (Max_Row((k-1)(Max_Col)+(j-1))+(i-1))
                

"Size of elements" is the number of bytes of each element in the array.

CodeView 4.0, 4.01, 4.05, and 4.1 do not have a FORTRAN expression evaluator and incorrectly display the array in the locals window.


Additional query words: nofps kbinf 3.00 3.50 4.00 4.10

Keywords: KB37548