. mips :: RISCos :: 3103DOC MIPS-FORTRAN Programmers Guide and Language Reference May1989. length explicit. Function f* character*10 function f()f = 0123456789%—-. l*dUrn at Passed address. Moves value to location *f is a function written in FORTRAN. c Array Handling FORTRAN stores arrays in column-major order with the leftmost subscript vary-ing the fastest. C, however, stores arrays in the opposite arrangement, with therightmost subscripts varying the fastest, which is called row-major order. Heres I how the layout of FORTRAN arrays and C arrays looks: 3-4 Part I: FORTRAN Programmers Guide F
. mips :: RISCos :: 3103DOC MIPS-FORTRAN Programmers Guide and Language Reference May1989. length explicit. Function f* character*10 function f()f = 0123456789%—-. l*dUrn at Passed address. Moves value to location *f is a function written in FORTRAN. c Array Handling FORTRAN stores arrays in column-major order with the leftmost subscript vary-ing the fastest. C, however, stores arrays in the opposite arrangement, with therightmost subscripts varying the fastest, which is called row-major order. Heres I how the layout of FORTRAN arrays and C arrays looks: 3-4 Part I: FORTRAN Programmers Guide FORTRAN Program Interfaces FORTRAN integer t (2f3)t(l,l)f t(2,l), t(l,2), t(2,2), t(l,3), t(2f3) int t [2] [3] /t[0][0], t[0][l], t[0][2], t[l][0], t[l][l], t[l][2] Note that the default for the lower bound of an array in FORTRAN is 1, whereasit is 0 in C When a C routine uses an array passed by a FORTRAN subprogram, the dimen-sions of the array and the use of the subscripts must be interchanged, as shown inthe following example. FORTRAN caller: 10 integecall p(awrite(6format (stopend. .0)a(l,3):,19) 0 called routine: void P_( a, i, j, intjLl* *j, /^|||| Dimensions and subscriptsx§/ are reversed. 1 is subtracted fro _iilip the indices j and i arepointers to integersbitsavers_mipsRISCosrogrammersGuideandLanguageReferenceMay19_75995480
Size: 1315px × 1900px
Photo credit: © The Reading Room / Alamy / Afripics
License: Licensed
Model Released: No
Keywords: ., bookcentury1900, bookdecade1910, booksubjectlanguag, bookyear1919