Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kubota100

    Fortran's rules for passing arrays to a Sub?

    Woops - thenks for the Fortran DLL links and ideas. I'll look further into that approach.
  2. kubota100

    Fortran's rules for passing arrays to a Sub?

    Ah, it's good to know how those arrays are connected. I believe I'm on track now. Re the testing of the program, all I need to do is run some integral calculations - simple ones such as INT (0,1) 1/SQRT(x) dx = 2 (exactly), and INT (0,1) LN(x) dx = -1 (exactly). I look forward to getting those...
  3. kubota100

    Fortran's rules for passing arrays to a Sub?

    Thank you for your fast response and helpful advice. Hopefully the following will answer some of the questions. The program I'm translating to VB is the Clenshaw-Curtis numerical integration program originally published in 1972 as TOMS Algorithm 424. The link to the Fortran listing on John...
  4. kubota100

    Fortran's rules for passing arrays to a Sub?

    As an extension to the principles discussed above, in trying to understand another part of an old Fortran program (I don't have a Fortran compiler): Say a main program calls a sub: ============================= Function ... MainArray(100) MainArray(10) = 25 CALL MYSUB(MainArray(10)) ' ' '...
  5. kubota100

    Fortran's rules for passing arrays to a Sub?

    Thank you for your response. Unfortunately, I don't have the ability to compile Fortran code, and my knowledge of Fortran is quite basic, as you can tell! However, I may attempt to translate some Fortran code (Quadpack integration package) over to VBA for running in Excel, and this is the...
  6. kubota100

    Fortran's rules for passing arrays to a Sub?

    Thank you for your advice. 1. Say, further to the example discussed, if the X array passed to the sub was modified by the sub, for returning back to the calling routine, then in the calling routine, can I copy the X array back to the same column of A using the reverse statement: A(1:,n)=X(1:)...
  7. kubota100

    Fortran's rules for passing arrays to a Sub?

    Thank you for the excellent clarifying detail. On a slightly different tangent, if I was translating the Fortran code for running as VBA code, where calling type must equal called type, then, as an extension to my example 1 above, would you recommend firstly copying the first column of the...
  8. kubota100

    Fortran's rules for passing arrays to a Sub?

    It's unclear to me exactly what the Fortran language passes from a calling routine to a called routine when the calling variables are arrays, and the calling and called variable types do not match! My confusion relates to exactly what is being received by the called routine - array elements...

Part and Inventory Search

Back
Top