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 SkipVought 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: *

  • Users: ArkM
  • Order by date
  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...
  16. ArkM

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

    >I've heard that in this cases is better to change the programming language to other that deals better with dereferences. It sounds like after crash in the expression x/0.0 you want to switch to the programming language that deals better with divide by zero operations. Better look at the malloc...
  17. ArkM

    Jump backwards to the beginning with go to order?

    There are three ways "to transfer the desired value from subroutine 2 into subroutine 1": 1. Use subroutine parameters... 2. ...or some kind of common storage (old-fashioned common blocks or modules in modern fortran)... 3. ...or external storage (write then read files). But you never transfer...
  18. ArkM

    Unknown Operator

    => - lambda operator (C# 3.0). See: http://msdn.microsoft.com/en-us/library/bb397687.aspx <= - less or equal to operator. Simple and clear...
  19. ArkM

    running service from command line

    May be it helps: http://www.codeproject.com/Articles/14353/Creating-a-Basic-Windows-Service-in-C (don't worry, it's about Csharp, not C;)...
  20. ArkM

    Tricking Fortran

    It sound like this: can you help me to assign value 2 to all constants 1 in my code? PARAMETER statements define symbolic names of CONSTANTS. Don't mix up PARAMETER defined names with routine parameters. Better present your codes where you are trying "making a new set a parameter equal to the...

Part and Inventory Search

Back
Top