Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90



Another use would be to read the input file with a one-line buffer;
parse the data in the buffer and count whatever the program to count;
allocate array space based on the count(s); REWIND; and read the data
into the allocated arrays. (Unless, of course, you require the user to
supply "control cards" at the beginning of the data "deck" ;^)

.



Relevant Pages

  • Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
    ... >parse the data in the buffer and count whatever the program to count; ... >allocate array space based on the count; REWIND; and read the data ... good illustration of how the use of REWIND might differ from FORTRAN ...
    (comp.lang.fortran)
  • system() and _flushall()
    ... You must explicitly flush (using fflush or _flushall) or close any stream ... However, on the next read from the input file using fgets, I get ... forgotten that there's still data in the buffer (the buffer is not destroyed ...
    (microsoft.public.vc.language)
  • Re: Implementing a "pull" (?) interface in perl
    ... # just parse what we have ... ## buffer if needing comment/cdata closure ... Use a schema checker ... Before you initiate parsing, you should validate the file, something ...
    (comp.lang.perl.misc)
  • Re: Implementing a "pull" (?) interface in perl
    ... # just parse what we have ... ## buffer if needing comment/cdata closure ... Use a schema checker ... Before you initiate parsing, you should validate the file, something ...
    (comp.lang.perl.misc)
  • Re: Storing input into a character array
    ... you're not protecting your buffer against ... fields you want to parse). ... you're using &temp rather than temp - ... use fgets rather than fscanf. ...
    (comp.lang.c)