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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ArkM

  1. ArkM

    Fortran 90, PUBLIC subroutines, and "local" variables within subroutines

    The problem is that Fortran 90 Standard did not define clearly if locally declared allocatable arrays are deallocated automatically when they go out of scope. Only Fortran 95 Standard guarantees this feature explicitly.
  2. ArkM

    Fortran 90, PUBLIC subroutines, and "local" variables within subroutines

    Remark: As far as I know, automatic deallocations some kinds of local allocatable arrays was introduced in Fortran 95 and later...
  3. ArkM

    Fortran 90, PUBLIC subroutines, and "local" variables within subroutines

    PRIVATE attribute regulates visibility of names declared in MODULE scope. It does not relate to the life span of declared variables. All your allocatable arrays (and integer variables) are locals in its own subroutines. These names are not directly accessible out of subroutine scope(s). You...
  4. ArkM

    Help with multi-diemensional array

    The 3rd line of your output is: ... is 89 (please, look at your program output again;) It's a wrong way to get max row values: it does not work for negative values. Right way: #define N 3 int maxval; int a[N][N] = { ... ... for (i = 0; i < N; ++i) { maxval = a[i][0]; for (j = 1; j < N...
  5. ArkM

    memory problem

    Try to close opened units (not only reopen them for another external files) then see what happens.
  6. ArkM

    memory problem

    Please, look at the chaotic source text in OP. Post the program again, embed your source in code TGML tag (press help button on the posting panel for instruction).
  7. ArkM

    compaq Virtual fortran

    What a pity!..
  8. ArkM

    compaq Virtual fortran

    Visual (not Virtual) Fortran?.. As far as I know Compaq Visual Fortran was embedded to Visual Studio IDE. VS IDE Editor shows line numbers after that: Tools|Options|Text Editor|All Languages then Display/Line numbers check on... May be it helps...
  9. ArkM

    Output formatting

    Why you have used n before initialization? You allocate arrays with undefined n. Of course, your program crashed after that...
  10. ArkM

    How to prevent overflow (and precision loss) in big factorials

    Some notes: 1. It's impossible to represent n! for n > 170 as a double value (170! ~ 7.25E306). All double n! values after 18! are factorial approximations only. 2. It's impossible to represent n! exactly for n > 20 as integer*8 value (20! = 2432902008176640000). It's not Fortran issue: it's...
  11. ArkM

    How to deal with stubborn &quot;Dereference to null pointer&quot; errors?

    If it's possible, try to pass your problem(s) to the personal expert(s); don't waste a time on forums ;) BTW, many years ago we solved 1-2-3GB data physical problems with 192K byte computer memory. Key words: proper algorithmes selection ;)
  12. ArkM

    How to deal with stubborn &quot;Dereference to null pointer&quot; errors?

    Dangerous code. You assign pointers to global variables, don't free (and never check) cleanbuffer allocation. You compare short buffer[iii] with pointer value NULL (why?). The last loop is exactly buffer and clearbuffer "assign zero to all elements" operation (think why - and look at the...
  13. ArkM

    How to deal with stubborn &quot;Dereference to null pointer&quot; errors?

    exit(1)... Probably, it's bedtime... Good luck!
  14. ArkM

    How to deal with stubborn &quot;Dereference to null pointer&quot; errors?

    Sorry, must be == NULL in my prev snipet ;(
  15. ArkM

    How to deal with stubborn &quot;Dereference to null pointer&quot; errors?

    Well, it seems you understand the problem ;) Your if (condition) is not stupid, it's incorrect expression example (see operator priorities in C). That's it in C language style (look at parenteses balance): if ((_buffer = malloc(elementos*sizeof(double))) != NULL) { /* no need for cast if you...

Part and Inventory Search

Back
Top