reading an external text file

  • Follow


program harper3
CHARACTER(256) :: Filename
CHARACTER(100) :: content
Filename ="m16.txt"
OPEN(10,FILE=Filename,STATUS='OLD')
read(10,'(a)') content
CLOSE(10)
write (*,*) content
end program harper3
!end source
At long last, the above opens a file and retrieves data from it.  When
it hits a carriage return or a newline character in the text file, it
stops the read.  What gives?

Given that this is a single text file of modest size, wouldn't I want
to make a single read to get it all into a character array, or
whatever fortran does instead of that C vernacular*, and then pick
apart the char array as necessary?  The program is called harper3 for
reasons having to do with continuity in my own programming
environment.  John had nothing to do with the above.  He did however
recommend a book that I'm reading called _The Mathematical Sciences
Essays for COSRIMS_.  MIT Press 1969.  Fascinating.
--
Wade Ward
*I dispute Eric Sosman's reading of the word "vernacular."

0
Reply zaxfuuq1 (47) 6/26/2007 9:35:10 PM

On Jun 26, 5:35 pm, Wade Ward <zaxf...@gmail.com> wrote:
> program harper3
> CHARACTER(256) :: Filename
> CHARACTER(100) :: content
> Filename ="m16.txt"
> OPEN(10,FILE=Filename,STATUS='OLD')
> read(10,'(a)') content
> CLOSE(10)
> write (*,*) content
> end program harper3
> !end source
> At long last, the above opens a file and retrieves data from it.  When
> it hits a carriage return or a newline character in the text file, it
> stops the read.  

Yes, that's the way Fortran "record-oriented" I/O has worked for the
last 50 years, and all the textbooks discuss this.

0
Reply beliavsky (2207) 6/26/2007 9:56:24 PM


Wade Ward wrote:
> program harper3
> CHARACTER(256) :: Filename
> CHARACTER(100) :: content
> Filename ="m16.txt"
> OPEN(10,FILE=Filename,STATUS='OLD')
> read(10,'(a)') content
> CLOSE(10)
> write (*,*) content
> end program harper3
> !end source
> At long last, the above opens a file and retrieves data from it.  When
> it hits a carriage return or a newline character in the text file, it
> stops the read.  What gives?
> 
> Given that this is a single text file of modest size, wouldn't I want
> to make a single read to get it all into a character array, or
> whatever fortran does instead of that C vernacular*, and then pick
> apart the char array as necessary?  ...

Depends on the form of the data and what you want to do with it.

As Beliavsky notes, Fortran I/O is record-oriented as opposed to 
stream-oriented for lack of a better vernacular :) for the C idiom...

Where C has a repeat on a getchar() call, in Fortran vernacular :) you 
repeat on a read() statement returning the requested data into a 
variable a line at a time (typically--other things are possible, but 
that's the norm).

So if your data were all character (string) rather than numeric if you 
include your read statement in a loop you can then process the data a 
line/record at a time...

I was going to write a sample, but SWMBO just called supper, sorry... :)

--
0
Reply none1568 (6646) 6/26/2007 11:08:38 PM

In article <1182893710.328825.266680@q75g2000hsh.googlegroups.com>,
Wade Ward  <zaxfuuq@gmail.com> wrote:
>program harper3
....
>end program harper3
>!end source
>At long last, the above opens a file and retrieves data from it.  When
>it hits a carriage return or a newline character in the text file, it
>stops the read.  What gives?
>
>Given that this is a single text file of modest size, wouldn't I want
>to make a single read to get it all into a character array...?
 
The program did exactly what Wade told it to. One read statement
of the kind he used reads one line of the text file into the
variable called content, which is scalar, NOT an array, and which is 
100 characters long. RTFM to see what happens if any line in the file 
is under or over 100 characters.

To do what Wade now seem to be asking for requires content to be an
array. An amendment that works is the following, and it has some
simple sanity checks. I changed the file name to be the name of my 
source program file, to check more easily. The reading and writing
could have been done without a DO loop, but the present version may
gives more useful output if there's a read error. Wade may look up 
the implied-do syntax for himself. 

program testreadarray ! in file testreadarray.f90
  CHARACTER(256) :: Filename
  CHARACTER(100) :: content(200) ! array of 200 100-character elements
  INTEGER        :: nread,i,nmax
  nmax = size(content) ! Number of elements in the array
  Filename ="testreadarray.f90"
  OPEN(10,FILE=Filename,STATUS='OLD')
  DO i = 1,nmax        ! stop reading when content is full
     read(10,'(a)',END=666,ERR=999) content(i)
! As lines < 100 long are padded with blanks, trim is used below.
     write (*,'(A)') trim(content(i))
  END DO
666 CLOSE(10)
! If no read error and the file has >= nmax lines, i will now be nmax+1
  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program testreadarray

-- John Harper, School of Mathematics, Statistics and Computer Science, 
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
0
Reply harper (718) 6/27/2007 12:49:48 AM

dpb wrote:
> Wade Ward wrote:
>> program harper3
>> CHARACTER(256) :: Filename
>> CHARACTER(100) :: content
>> Filename ="m16.txt"
>> OPEN(10,FILE=Filename,STATUS='OLD')
>> read(10,'(a)') content
>> CLOSE(10)
>> write (*,*) content
>> end program harper3
>> !end source
>> At long last, the above opens a file and retrieves data from it.  When
>> it hits a carriage return or a newline character in the text file, it
>> stops the read.  What gives?
>>
>> Given that this is a single text file of modest size, wouldn't I want
>> to make a single read to get it all into a character array, or
>> whatever fortran does instead of that C vernacular*, and then pick
>> apart the char array as necessary?  ...
> 
> Depends on the form of the data and what you want to do with it.
> 
> As Beliavsky notes, Fortran I/O is record-oriented as opposed to 
> stream-oriented for lack of a better vernacular :) for the C idiom...
> 
> Where C has a repeat on a getchar() call, in Fortran vernacular :) you 
> repeat on a read() statement returning the requested data into a 
> variable a line at a time (typically--other things are possible, but 
> that's the norm).
> 
> So if your data were all character (string) rather than numeric if you 
> include your read statement in a loop you can then process the data a 
> line/record at a time...

OK, it's now morning and I'm tied here waiting for a call, so on the 
assumption it's still of interest...

Something like the following would allow you to process the data as it 
is read if the algorithm for whatever processing you are doing doesn't 
require more than the current observation simultaneously.  This has the 
advantage of minimal memory usage w/ the disadvantage of (obviously) not 
the previous data no longer being available after the loop if other 
things are desired/needing to be done.

program harper3
   CHARACTER(256) :: Filename
   CHARACTER(100) :: content
   INTEGER        :: ios

   Filename ="m16.txt"
   OPEN(10,FILE=Filename,STATUS='OLD')

   ios = 0  ! initialize status to ok
   do
     read(10,'(a)', iostat=ios) content
     ! check for eor/eof or error condition
     if(ios<0)then
       write(*,*) 'EOR/EOR encountered.  Terminating.'
       close(10)
       exit
     elseif (ios>0) then
       write(*,*) 'Error reading record.  Terminating.'
       close(10)
       exit
     endif
	
     ! If here, no error so do whatever w/ content here
     call my_proc_routine(content)
     write (*,*) content
   enddo
end program harper3

If you need to process multiple records at a time, then make your 
variable into an array and read into the elements of the array.  In that 
case you would undoubtedly want to bring the call to my_proc_routine() 
outside the loop.

There are, of course, as many variations on a theme as there are users... :)

Similar examples should be readily available in any text or even in the 
supplied examples from various compilers.

HTH...the phone just rang so above not tested for typos, etc., ...

--
0
Reply none1568 (6646) 6/27/2007 2:12:39 PM

On Jun 27, 10:12 am, dpb <n...@non.net> wrote:

<snip>

> Something like the following would allow you to process the data as it
> is read if the algorithm for whatever processing you are doing doesn't
> require more than the current observation simultaneously.  This has the
> advantage of minimal memory usage w/ the disadvantage of (obviously) not
> the previous data no longer being available after the loop if other
> things are desired/needing to be done.

The disadvantages of the methods you and Mr. Harper illustrated are
that
(1) lines shorter than 100 characters are padded with blanks and
(2) (more seriously) lines longer than 100 characters are truncated.

I use the same method in my codes and don't intend the above as
criticism. Memory is cheap enough that I typically make the character
variable a factor of 10 larger than what I think is needed.

>
> program harper3
>    CHARACTER(256) :: Filename
>    CHARACTER(100) :: content
>    INTEGER        :: ios
>
>    Filename ="m16.txt"
>    OPEN(10,FILE=Filename,STATUS='OLD')
>
>    ios = 0  ! initialize status to ok
>    do
>      read(10,'(a)', iostat=ios) content
>      ! check for eor/eof or error condition
>      if(ios<0)then
>        write(*,*) 'EOR/EOR encountered.  Terminating.'
>        close(10)
>        exit
>      elseif (ios>0) then
>        write(*,*) 'Error reading record.  Terminating.'
>        close(10)
>        exit
>      endif
>
>      ! If here, no error so do whatever w/ content here
>      call my_proc_routine(content)
>      write (*,*) content
>    enddo
> end program harper3

<snip>

0
Reply beliavsky (2207) 6/27/2007 5:36:41 PM

On Jun 27, 1:36 pm, Beliavsky <beliav...@aol.com> wrote:
> On Jun 27, 10:12 am, dpb <n...@non.net> wrote:
>
> <snip>
>
> > Something like the following would allow you to process the data as it
> > is read if the algorithm for whatever processing you are doing doesn't
> > require more than the current observation simultaneously.  This has the
> > advantage of minimal memory usage w/ the disadvantage of (obviously) not
> > the previous data no longer being available after the loop if other
> > things are desired/needing to be done.
>
> The disadvantages of the methods you and Mr. Harper illustrated are
> that
> (1) lines shorter than 100 characters are padded with blanks and
> (2) (more seriously) lines longer than 100 characters are truncated.
>
> I use the same method in my codes and don't intend the above as
> criticism. Memory is cheap enough that I typically make the character
> variable a factor of 10 larger than what I think is needed.
[code snipped]
Thanks all for replies.  I'm certain that there is enough there to get
some of the minimal functionality I seek.  If you did a while loop
with a read statement in it s.t. you would have enough reads to get to
EOF, if you wrote to a file with lun = 11 and Status=New, but with
otherwise the same read/write specification, what you read on ten,
would the files be the same?  Gosh, that's unpretty English.
(Probably unmgrammatical too.)

Let me rephrase.  Let the open statement include using the IOstatus
specifier.  If I loop through on a while statement until IOStatus is
negative, will I get the whole file?
--
Wade Ward
--
Wade Ward


0
Reply zaxfuuq1 (47) 6/27/2007 9:50:28 PM

Wade Ward wrote:
> On Jun 27, 1:36 pm, Beliavsky <beliav...@aol.com> wrote:
>> On Jun 27, 10:12 am, dpb <n...@non.net> wrote:
>>
>> <snip>
>>
>>> Something like the following would allow you to process the data as it
>>> is read if the algorithm for whatever processing you are doing doesn't
>>> require more than the current observation simultaneously.  This has the
>>> advantage of minimal memory usage w/ the disadvantage of (obviously) not
>>> the previous data no longer being available after the loop if other
>>> things are desired/needing to be done.
>> The disadvantages of the methods you and Mr. Harper illustrated are
>> that
>> (1) lines shorter than 100 characters are padded with blanks and
>> (2) (more seriously) lines longer than 100 characters are truncated.
>>
>> I use the same method in my codes and don't intend the above as
>> criticism. Memory is cheap enough that I typically make the character
>> variable a factor of 10 larger than what I think is needed.
> [code snipped]
> Thanks all for replies.  I'm certain that there is enough there to get
> some of the minimal functionality I seek.  If you did a while loop
> with a read statement in it s.t. you would have enough reads to get to
> EOF, if you wrote to a file with lun = 11 and Status=New, but with
> otherwise the same read/write specification, what you read on ten,
> would the files be the same?  Gosh, that's unpretty English.
> (Probably unmgrammatical too.)
> 
> Let me rephrase.  Let the open statement include using the IOstatus
> specifier.  If I loop through on a while statement until IOStatus is
> negative, will I get the whole file?

The IOSTATUS specifier is on the READ, not the OPEN to ascertain EOF 
while reading the file.  Not sure what you have in mind precisely w/ the 
OPEN.  'NEW' or 'UNKNOWN' and "WRITE" for the second file are 
significant, perhaps.

If the READ iostatus negative is an EOF and not an EOR, yes.  EOR could 
occur if an individual record was longer than the variable allocated 
(Beliavisky's complaint/comment).  Other than that error, the code loop 
I gave if it included

write(11,'(A)') content

where you have write(*,*) would be, in essence, "copy filea fileb" at a 
DOS prompt...note that Fortran I/O will, by default, write the 
appropriate for the OS newline sequence transparently -- that's part of 
the record-based i/o paradigm as opposed to C stream i/o.  (Not 
better/worse, just different.)

There is a possible difference in that Fortran uses fixed-length 
character variables so if the source file is variable length records 
unless you TRIM() the data as it is written to the output file each line 
will be the same length as the defined character variable (100 in your 
example iirc).


There's the possible complication of trying to read a Unix-ish system 
file on a Windows system, but ignoring that the two should be the same 
w/ the above caveat.

hth...

--

0
Reply none1568 (6646) 6/27/2007 10:13:08 PM

dpb <none@non.net> wrote:

> EOR could 
> occur if an individual record was longer than the variable allocated...

No, that's not what EOR is about. EOR is relevant only to non-advancing
I/O.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
Reply nospam47 (9742) 6/27/2007 10:39:04 PM

"John Harper" <harper@mcs.vuw.ac.nz> wrote in message 
news:1182905387.885058@bats.mcs.vuw.ac.nz...
> In article <1182893710.328825.266680@q75g2000hsh.googlegroups.com>,
> Wade Ward  <zaxfuuq@gmail.com> wrote:
>>program harper3
> ...
>>end program harper3
>>!end source
>>At long last, the above opens a file and retrieves data from it.  When
>>it hits a carriage return or a newline character in the text file, it
>>stops the read.  What gives?
>>
>>Given that this is a single text file of modest size, wouldn't I want
>>to make a single read to get it all into a character array...?
>
> The program did exactly what Wade told it to. One read statement
> of the kind he used reads one line of the text file into the
> variable called content, which is scalar, NOT an array, and which is
> 100 characters long. RTFM to see what happens if any line in the file
> is under or over 100 characters.
>
> To do what Wade now seem to be asking for requires content to be an
> array. An amendment that works is the following, and it has some
> simple sanity checks. I changed the file name to be the name of my
> source program file, to check more easily. The reading and writing
> could have been done without a DO loop, but the present version may
> gives more useful output if there's a read error. Wade may look up
> the implied-do syntax for himself.
program harper2
 CHARACTER(*), PARAMETER :: FMTSTRING = '("m",i0,".txt")'
   CHARACTER(256) :: Filename
   INTEGER :: i, n_Files

   n_Files = 85

   DO i = 1, n_Files
     WRITE(Filename,FMT=FMTSTRING) i
     write (*,*) trim(Filename)
!    OPEN(10,FILE=Filename,STATUS='OLD')
!     ...do something with file
     CLOSE(10)
   END DO

end program harper2

program harper5
! was  testreadarray.f90 John Harper
  CHARACTER(256) :: Filename
  CHARACTER(100) :: content(200) ! array of 200 100-character elements
  INTEGER        :: i,nmax
  nmax = size(content) ! Number of elements in the array
  Filename ="m16.txt"
  OPEN(10,FILE=Filename,STATUS='OLD')
  DO i = 1,nmax        ! stop reading when content is full
     read(10,'(a)',END=666,ERR=999) content(i)
! As lines < 100 long are padded with blanks, trim is used below.
     write (*,'(A)') trim(content(i))
  END DO
666 CLOSE(10)
! If no read error and the file has >= nmax lines, i will now be nmax+1
  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program harper5
! end source
I'm at the point where I'm going to combine the above progs.  Having n_Files 
hard coded at 85 is what I need.  Furthermore, 200 100-character arrays are 
appropriate for what I'm going after.  There is one thing I want to add.  In 
pseudo code:
if (the first character of content(i) == '>')
then continue
else    write (*,'(A)') trim(content(i))
endif
How do I write that in fortran?
--
Wade Ward 


0
Reply invalid (121) 6/28/2007 6:39:09 PM

Wade Ward wrote:
[...]
> I'm at the point where I'm going to combine the above progs.  Having n_Files 
> hard coded at 85 is what I need.  Furthermore, 200 100-character arrays are 
> appropriate for what I'm going after.  There is one thing I want to add.  In 
> pseudo code:
> if (the first character of content(i) == '>')
> then continue
> else    write (*,'(A)') trim(content(i))
> endif
> How do I write that in fortran?

You nearly have it as is. :-)  You need to use a test on
a substring of content(i) (and I'd reverse the sense of
the test to avoid the empty block before the "else":

if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
then
    write (*, '(A)') trim(content(i))
endif

OK?

     -Ken
-- 
Ken & Ann Fairfield
What:  Ken dot And dot Ann
Where: Gmail dot Com
0
Reply ken158 (98) 6/28/2007 6:58:00 PM

"Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message 
news:5eieloF38fav3U1@mid.individual.net...
> Wade Ward wrote:
> [...]
>> I'm at the point where I'm going to combine the above progs.  Having 
>> n_Files hard coded at 85 is what I need.  Furthermore, 200 100-character 
>> arrays are appropriate for what I'm going after.  There is one thing I 
>> want to add.  In pseudo code:
>> if (the first character of content(i) == '>')
>> then continue
>> else    write (*,'(A)') trim(content(i))
>> endif
>> How do I write that in fortran?
>
> You nearly have it as is. :-)  You need to use a test on
> a substring of content(i) (and I'd reverse the sense of
> the test to avoid the empty block before the "else":
>
> if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
> then
>    write (*, '(A)') trim(content(i))
> endif
>
> OK?
My compiler complains if I don't have the 'then' on the same line as the if, 
but it works like a charm.
--
Wade Ward 


0
Reply invalid (121) 6/28/2007 8:03:50 PM

Wade Ward <invalid@invalid.nyet> wrote:

> "Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message 
> news:5eieloF38fav3U1@mid.individual.net...

> > if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
> > then
> >    write (*, '(A)') trim(content(i))
> > endif

> My compiler complains if I don't have the 'then' on the same line as the if,
> but it works like a charm.

You compiler is correct to complain. Either that or, since there is only
a single statement to be executed when the condition is true, you can
shorten the whole thing to just

  if (content(i)(1:1) /= '>') write (*, '(A)') trim(content(i))

Either works. Some people prefer the style of aloways using the longer
form. Other people like to use the shorter form where it fits.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
Reply nospam47 (9742) 6/28/2007 8:30:58 PM

"Richard Maine" <nospam@see.signature> wrote in message 
news:1i0f6py.1vxnuk189zp3pN%nospam@see.signature...
> Wade Ward <invalid@invalid.nyet> wrote:
>
>> "Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message
>> news:5eieloF38fav3U1@mid.individual.net...
>
>> > if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
>> > then
>> >    write (*, '(A)') trim(content(i))
>> > endif
>
>> My compiler complains if I don't have the 'then' on the same line as the 
>> if,
>> but it works like a charm.
>
> You compiler is correct to complain. Either that or, since there is only
> a single statement to be executed when the condition is true, you can
> shorten the whole thing to just
>
>  if (content(i)(1:1) /= '>') write (*, '(A)') trim(content(i))
>
> Either works. Some people prefer the style of aloways using the longer
> form. Other people like to use the shorter form where it fits.

program harper6
CHARACTER(100) :: content(200)
INTEGER        :: i,nmax
CHARACTER(*), PARAMETER :: FMTSTRING = '("m",i0,".txt")'
CHARACTER(256) :: Filename
INTEGER ::  n_Files, j
integer, dimension(85) :: age

n_Files = 5
nmax = size(content)
DO j = 1, n_Files
  WRITE(Filename,FMT=FMTSTRING) j
  OPEN(10,FILE=Filename,STATUS='OLD')
    DO i = 1,nmax
      read(10,'(a)',END=666,ERR=999) content(i)
      if (content(i)(1:1) /= '>')  then
      write (*, '(A)') trim(content(i))
      endif
    END DO
  666 CLOSE(10)
  write (*,'(a)', advance='no') "How old is this cat? "
  read (*, '(i2)') age(j)
end do


  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program harper6
I like the concise form for the if statement when it's as simple as the one 
in question.

I have 2 forms of input in this program now.  One is from 10, the other the 
keyboard.  Normally, I would run the executable and redirect the output by 
using a dos window and typing harper6 >text3.txt .  I would instead like to 
write it to a file using fortran.  How do I write this to a file, say, 
output1.txt, giving it permission to write over any previous output1.txt ?
--
Wade Ward


0
Reply invalid (121) 6/28/2007 8:48:42 PM

"dpb" <none@non.net> wrote in message news:f5ung8$o2n$1@aioe.org...
> Wade Ward wrote:
>> On Jun 27, 1:36 pm, Beliavsky <beliav...@aol.com> wrote:
>>> On Jun 27, 10:12 am, dpb <n...@non.net> wrote:
>>>
>>> <snip>
>>>
>>>> Something like the following would allow you to process the data as it
>>>> is read if the algorithm for whatever processing you are doing doesn't
>>>> require more than the current observation simultaneously.  This has the
>>>> advantage of minimal memory usage w/ the disadvantage of (obviously) 
>>>> not
>>>> the previous data no longer being available after the loop if other
>>>> things are desired/needing to be done.
>>> The disadvantages of the methods you and Mr. Harper illustrated are
>>> that
>>> (1) lines shorter than 100 characters are padded with blanks and
>>> (2) (more seriously) lines longer than 100 characters are truncated.
>>>
>>> I use the same method in my codes and don't intend the above as
>>> criticism. Memory is cheap enough that I typically make the character
>>> variable a factor of 10 larger than what I think is needed.
Since the files came off of usenet, you wouldn't expect them to be more than 
what, 75 characters per record?  Which character specifically determines end 
of record?

>> Let me rephrase.  Let the open statement include using the IOstatus
>> specifier.  If I loop through on a while statement until IOStatus is
>> negative, will I get the whole file?
>
> The IOSTATUS specifier is on the READ, not the OPEN to ascertain EOF while 
> reading the file.  Not sure what you have in mind precisely w/ the OPEN. 
> 'NEW' or 'UNKNOWN' and "WRITE" for the second file are significant, 
> perhaps.
>
> If the READ iostatus negative is an EOF and not an EOR, yes.  EOR could 
> occur if an individual record was longer than the variable allocated 
> (Beliavisky's complaint/comment).  Other than that error, the code loop I 
> gave if it included
>
> write(11,'(A)') content
>
> where you have write(*,*) would be, in essence, "copy filea fileb" at a 
> DOS prompt...note that Fortran I/O will, by default, write the appropriate 
> for the OS newline sequence transparently -- that's part of the 
> record-based i/o paradigm as opposed to C stream i/o.  (Not better/worse, 
> just different.)
>
> There is a possible difference in that Fortran uses fixed-length character 
> variables so if the source file is variable length records unless you 
> TRIM() the data as it is written to the output file each line will be the 
> same length as the defined character variable (100 in your example iirc).
>
>
> There's the possible complication of trying to read a Unix-ish system file 
> on a Windows system, but ignoring that the two should be the same w/ the 
> above caveat.
I'm now able to read the messages in this thread much more closely because 
I'm no longer shackled by lack of internet connection.  A person can get by 
for a week going to the library and elbowing out the bums and the perverts 
in order to get comment from a newsgroup through the google portal.  Doing 
it for over a month goes from austerity to privation.

I was able to use the trim() function to my benefit for the first time 
yesterday.  I'll take another look at your upthread source.
--
Wade Ward





0
Reply invalid (121) 6/28/2007 9:19:25 PM

In article <FbednfKhC50bnRnbnZ2dnUVZ_oKnnZ2d@comcast.com>,
Wade Ward <invalid@invalid.nyet> wrote:
>
>There is one thing I want to add.  In pseudo code:
>if (the first character of content(i) == '>')
>then continue
>else    write (*,'(A)') trim(content(i))
>endif
>How do I write that in fortran?

if (content(i)(1:1) /= '>') write (*,'(A)') trim(content(i))

is about the shortest way. (You don't need "then", "else" and "endif" 
if, as here, you can rewrite it to use only what would have been a 
"then" part, and if that part is a single executable statement that 
doesn't start with "if" or "end" or "do" or various other possibilities 
that you can look up in your favourite f95 book).

-- John Harper, School of Mathematics, Statistics and Computer Science, 
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
0
Reply harper (718) 6/28/2007 10:06:57 PM

Wade Ward wrote:
> "Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message 
> news:5eieloF38fav3U1@mid.individual.net...
>> Wade Ward wrote:
>> [...]
>>> I'm at the point where I'm going to combine the above progs.  Having 
>>> n_Files hard coded at 85 is what I need.  Furthermore, 200 100-character 
>>> arrays are appropriate for what I'm going after.  There is one thing I 
>>> want to add.  In pseudo code:
>>> if (the first character of content(i) == '>')
>>> then continue
>>> else    write (*,'(A)') trim(content(i))
>>> endif
>>> How do I write that in fortran?
>> You nearly have it as is. :-)  You need to use a test on
>> a substring of content(i) (and I'd reverse the sense of
>> the test to avoid the empty block before the "else":
>>
>> if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
>> then
>>    write (*, '(A)') trim(content(i))
>> endif
>>
>> OK?
> My compiler complains if I don't have the 'then' on the same line as the if, 
> but it works like a charm.

(What's the moticon for an embarrassed look? :-} )

Sorry, yes, the "then" should be on the same line.  I've recently been
writing some code in DECTPU which, as a common style, puts the "then"
on it's own line, at least for other than one-liners.  The same style
is used for block-if-then-else-endif in DCL.  I know, you didn't ask...
:-)

Also, Richard Maine's example of doing this in a single statement is
another alternative, but I sort of assumed you might want to do more
than just the single write.

     -Ken
-- 
Ken & Ann Fairfield
What:  Ken dot And dot Ann
Where: Gmail dot Com
0
Reply ken158 (98) 6/28/2007 10:38:45 PM

Wade Ward wrote:
....
> ...Normally, I would run the executable and redirect the output by 
> using a dos window and typing harper6 >text3.txt .  I would instead like to 
> write it to a file using fortran.  How do I write this to a file, say, 
> output1.txt, giving it permission to write over any previous output1.txt ?

OPEN the file w/ another unit number specifying STATUS='REPLACE'

What compiler are you using?  Do you not have any documentation to read? 
   I'm tempted but will resist the obvious single acronym response.

--

0
Reply none1568 (6646) 6/28/2007 10:41:34 PM

"dpb" <none@non.net> wrote in message news:f61dhi$pu9$1@aioe.org...
> Wade Ward wrote:
> ...
>> ...Normally, I would run the executable and redirect the output by using 
>> a dos window and typing harper6 >text3.txt .  I would instead like to 
>> write it to a file using fortran.  How do I write this to a file, say, 
>> output1.txt, giving it permission to write over any previous output1.txt 
>> ?
>
> OPEN the file w/ another unit number specifying STATUS='REPLACE'
>
> What compiler are you using?  Do you not have any documentation to read? 
> I'm tempted but will resist the obvious single acronym response.
>
I'm using a compiler that I think is outstanding, Silverfrost's Plato 3.  I 
wish I had a manual, so that I could f**in' read it.  I'm not lazy in my 
study of MR&C; it's just sometimes pitched for a different fiddler.  What I 
had to do was duplicate the writes that I was making to whereever the 
asterisk goes.  My thickheadedness is likely a function of not having used 
fortran to ever open a file, not even in college.  I was switching the 
months on my calender today and recalled that our final project was to 
create a perpetual calender.  I had trouble with the output.  This is the 
latest version of this prog:


program harper7
CHARACTER(100) :: content(200)
INTEGER        :: i,nmax , n_Files, j, k
CHARACTER(*), PARAMETER :: FMTSTRING = '("m",i0,".txt")'
CHARACTER(256) :: Filename

integer, dimension(85) :: age
real :: sum, avg

n_Files = 84
nmax = size(content)
OPEN(11, File="output1.txt",STATUS='REPLACE')

DO j = 1, n_Files
  WRITE(Filename,FMT=FMTSTRING) j
  OPEN(10,FILE=Filename,STATUS='OLD')
    DO i = 1,nmax
      read(10,'(a)',END=666,ERR=999) content(i)
      if (content(i)(1:1) /= '>')  then
      write (*, '(A)') trim(content(i))
      write (11, '(A)') trim(content(i))
      endif
    END DO
  666 CLOSE(10)
  write (*,'(a)', advance='no') "How old is this cat? "
  write (11,'(a)', advance='no') "How old is this cat? "
  read (*, '(i2)') age(j)
  write (11,'(i2)') age(j)
  do k=1, 30
    write(*,*)
    end do
end do
sum = 0.0
do k = 1, n_Files
  sum = sum + age(k)
  end do
  avg=sum/n_Files
   write (*,'(f5.2)') avg
   write (11, '(a)', advance='no') "average is "
   write (11, '(f5.2)') avg

close(11)

  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program harper7
! end source begin abridged output
Hello guys,

Now that it's weekend and we don't need to program anymore (do
we? ;-) i thought it was time to ask a fun question... something
that I've been wondering about for quite some time now...

We all know that FORTRAN/Fortran is an 'old' language and i have
the impression that in some areas -despite the new F2003 standard-
Fortran programmers are becoming rare, almost an extinct species...

I have the impression that not much 'younger ones' really get to
learn and appreciate the language.

So just to check that... here's my question:

"How old are you, as a Fortran programmer?"
....
My favorite language is F90/F95, though I get laughs when I tell the
"younger" crowd this.  Being a contractor, I've received the most $$
on my Fortran gigs.
How old is this cat? 47
I'm 22 and began programming in Fortran since 2004, initially working
on crop models. It's neat to be using a language that has such a long
history.
How old is this cat? 22
On Mar 3, 2:58 am, Bart Vandewoestyne
<MyFirstName.MyLastN...@telenet.be> wrote:

Age 54. Learned FORTRAN in late '62 or early '63 from a local
professor who was doing an experiment in teaching "new math". Since
then sporadic work on IBM 360 & 370, PDP-10, Univac 1108 and various
micro-computers.

-- Elliot

How old is this cat? 54
....
I'm 64 and first used Fortran in 1964 when I had a summer job with IBM.

--
John Wingate
7/8/9
How old is this cat? 64
average is 47.74
!end output
So there it is.  If Mike Metcalf is 60 and Tooen Moon is 45, then the 
average age of respondents is just shy of 48.
--
Wade Ward 


0
Reply invalid (121) 6/29/2007 12:40:56 AM

Wade Ward <invalid@invalid.nyet> wrote:

> "How old are you, as a Fortran programmer?"

Uh. We just had a longish thread on exactly that a few weeks ago. I
think I even recall the slighly strange turn of phrase about "how old
are you as a Fortran programmer". Better to go read that thread than
start a new one. (Summary: your impression is wrong. The age range is
quite large).

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
Reply nospam47 (9742) 6/29/2007 1:30:22 AM

"Richard Maine" <nospam@see.signature> wrote in message 
news:1i0fkmt.q25wweufr9y3N%nospam@see.signature...
> Wade Ward <invalid@invalid.nyet> wrote:
>
>> "How old are you, as a Fortran programmer?"
>
> Uh. We just had a longish thread on exactly that a few weeks ago. I
> think I even recall the slighly strange turn of phrase about "how old
> are you as a Fortran programmer". Better to go read that thread than
> start a new one. (Summary: your impression is wrong. The age range is
> quite large).
You mean this thread?
Hello guys,

Now that it's weekend and we don't need to program anymore (do
we? ;-) i thought it was time to ask a fun question... something
that I've been wondering about for quite some time now...

We all know that FORTRAN/Fortran is an 'old' language and i have
the impression that in some areas -despite the new F2003 standard-
Fortran programmers are becoming rare, almost an extinct species...

I have the impression that not much 'younger ones' really get to
learn and appreciate the language.

So just to check that... here's my question:

"How old are you, as a Fortran programmer?"

Feel free to respond, I'll collect the ages and report on the
average afterwards :-)

As for myself, I am 28 but will be 29 this month :-)

Best wishes,
Bart

--
"Share what you know.  Learn what you don't."
How old is this cat? 28
I'm 32 years old and have been using Fortran for almost 10 years.
How old is this cat? 32
Bart Vandewoestyne schrieb:

I'm almost 50 years old,
using Fortran for more than half of my life ;-)

Fortran is the choice for number crunching,
also a lot of old but good numerical calculations
is written in Fortran.

Toni (Austria)
How old is this cat? 50
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> writes:


26, began learning Fortran five or six years ago.

Regards,

Sebastian
How old is this cat? 26
Bart Vandewoestyne wrote:

Me, 46.  Been using it since the USAF put me in the comm/computers field
in '84...

Still using Forrtan 77 too :-(

Jim C
How old is this cat? 46
Bart Vandewoestyne wrote:

Me, 33. Learned F77 during a summer project when I was an undergraduate 
(1992).
Subsequently learned F90/95 during my PhD (1994-1997).
How old is this cat? 33
Bart Vandewoestyne wrote:

I'm 30 this month. I had to code an undergraduate project in Fortran 95
about a decade ago. Never used it since. Now I use OCaml and F# for
scientific computing.

--
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet
How old is this cat? 30
On Mar 3, 8:58 am, Bart Vandewoestyne
<MyFirstName.MyLastN...@telenet.be> wrote:

23, learned Fortran 2 years ago.
How old is this cat? 23
Bart Vandewoestyne wrote:


I'll be 65 this July, I started using FORTRAN in 1963.

Dick Hendrickson
How old is this cat? 65
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> wrote:


I'm 55. I started using Fortran in 1968, when I was 16 and a senior in
high school.

--
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
How old is this cat? 55
On Sat, 3 Mar 2007 09:09:55 -0800, Richard Maine <nospam@see.signature>
 wrote in <1hue68d.c9xo0o1ix49q7N%nospam@see.signature>:



I'm a couple of months younger than Richard, I believe, but started
FORTRAN a couple of years later, in a first-year Applied Maths course at
ANU (punched cards on an IBM 360/?? (50?)) in 1970.

--
Ivan Reid, School of Engineering & Design, _____________  CMS Collaboration,
Brunel University.    Ivan.Reid@[brunel.ac.uk|cern.ch]    Room 40-1-B12, 
CERN
        KotPT -- "for stupidity above and beyond the call of duty".
How old is this cat? 55
I am 27 (about to finish my PhD in Geophysics) and mostly code in
F90/95 :)
How old is this cat? 27
Bart Vandewoestyne wrote:
47, started using Fortran in 1978 (Cyber 171 I think, emulating MVS/TSO,
sort of with a version of xedit as the text editor).  I mostly use it to
create GUI calculation and data analysis and presentation tools with GINO.

--

Gary Scott
mailto:garylscott@sbcglobal dot net
How old is this cat? 47
Bart Vandewoestyne wrote:

62, started using Fortran in 1963.
--
------------------------------------------------------------------------
Frederick N. Webb                       fnwebb@pobox.com
179 Harvard Road                        Phone: (978) 486-8657
Littleton, MA 01460                     FAX:   (508) 652-7787
How old is this cat? 62
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> wrote in
news:XU9Gh.37362$Hg4.230461@phobos.telenet-ops.be:

67 (close to the Abragam limit!). Started Fortran in '63 or '64.
Ian

--
*********** To reply by e-mail, make w single in address **************
How old is this cat? 67
In article <XU9Gh.37362$Hg4.230461@phobos.telenet-ops.be>,
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> writes:

44.  Started using Fortran (well watfiv and Fortran IV) in 1983.

PS:  I have to write a report on the weekend about my Fortran
     generated results. :-)

--
Steve
http://troutmask.apl.washington.edu/~kargl/
How old is this cat? 44

I'm 49, and have been using it since I learned fortran 4 in college in
1977. In the 80s we had DEC fortran with all it's nice extensions  and
then on to the 90/95 after that. It's still the language I use most,
although in my field almost everything is moving/ has moved to the
ubiquitous C++. I keep telling myself I have to as well, and I like
what it has to offer, just hate the ugly syntax it inherited from C.
How old is this cat? 49
Bart Vandewoestyne wrote:
[snip...]

54.  Started programming in Fortran at 16, in Freshman Physics.

-- Carlie J. Coats, Jr. Ph.D.
Chief Software Architect
Baron Advanced Meteorological Systems, LLC.
How old is this cat? 54
On Sat, 03 Mar 2007 07:58:47 GMT, Bart Vandewoestyne
<MyFirstName.MyLastName@telenet.be> wrote:

[snip]

I am 59.  I started programming with machine language, assembler
(SPS), and FORTRAN II in 1966 on an IBM 1620 (IBM Selectric for
console, card reader/punch, 60,000 words of ferrite core memory, no
registers).  The first program demonstrated by our instructor played a
song on a transistor radio placed on top of the "box" with the memory
by manipulating the timing/frequency of the EMF leakage from the
ferrite core memory.
--
Jeff Ryman
email:  rymanjc_at_
        excite_dot_com
How old is this cat? 59
Bart Vandewoestyne wrote:
The minimum age of the responders to clf questions might be 23, but I
teach Fortran to 30 kids each semester who are generally between the age
of 20 and 25.  However, I can't get them to pay any attention to clf
since they are too busy coding their next lab exercise in Fortran!

As for me, I learned Fortran in 1972 at the age of 19 on an old IBM 360.
  34 years and many languages later, I still find Fortran the best
language for numerical analysis and simulation models.
How old is this cat? 53

I'm 24, I wrote my first Fortran code 5 years ago and soon became quite
addicted :)

As for the age statistics, I'd also say that in my area of research
(physical chemistry) Fortran is well established and it's learnt by a lot
of undergrads and grad students (like me), but like others, I feel Usenet
is not so much used among them.

--
FX
How old is this cat? 24
Bart Vandewoestyne wrote:

Things are rarely what they appear to be... there's plenty Da Vinci code
chasers left out there for them to be on the endangered species list -
did you know that http://www.netlib.org had an all time record number
[~60 million] of hits last year?

Will be big S I X O this year; have used Fortran since 1969.
How old is this cat? 59

"Bart Vandewoestyne" <MyFirstName.MyLastName@telenet.be> wrote in message
news:XU9Gh.37362
I'm 41 this week and got an A in Fortran at BYU in 1987.  LS
How old is this cat? 41
Lane Straatman wrote:
(snip)


OK, I am 48 and started writing Fortran programs when I was 14.


-- glen
How old is this cat? 48
This average Fortran programmer is 58.
How old is this cat? 58
On Mar 3, 8:45 pm, Gib Bogle <b...@ihug.too.much.spam.co.nz> wrote:

I am 73 and startd programming in FORTRAN (rather than fortran) in
1961 via punched paper tape inouyt to an IBM machine whose id I no
longer recall. Maybe 1401? Not 701 or 704.
How old is this cat? 73
Here in comp.lang.fortran,
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be>
spake unto us, saying:


I'm 44.  First started in high school in 1978 or so with MUMNF (the
MECC Timesharing System's MULTI variant of Minnesota Fortran), wrote
lots of F77 code (@FTN) in college on a Sperry 1100/82 and 1100/91, and
have been writing code in various FORTRAN dialects (mainly F66/@FOR and
F77/@FTN) in areas related to the airline industry on Unisys 1100/2200
and Clearpath mainframe boxes since August 1988.

I'm actually bouncing back and forth between a C++/Solaris/Tux/MQ app
and a Unisys F77/HVTIP app right now, which makes for some interesting
mental context shifting.  Unisys mainframes are not UNIX boxes, and the
text editors I use (NEdit and @UEDIT) have very little in common.  :-)


I wish.  :-)

--
 -Rich Steiner >>>---> http://www.visi.com/~rsteiner >>>---> Mableton, GA 
USA
    Mainframe/Unix bit twiddler by day, OS/2+Linux+DOS hobbyist by night.
       WARNING: I've seen FIELDATA FORTRAN V and I know how to use it!
                   The Theorem Theorem: If If, Then Then.
How old is this cat? 44
On Sat, 3 Mar 2007 07:58:47 UTC, Bart Vandewoestyne
<MyFirstName.MyLastName@telenet.be> wrote:



54, learned Fortran in Uni in 73/74. didn't use it in earnest until
1979 when I started using DEC Fortran-IV-Plus on pdp11. Now use
VAX/DEC/CPQ/HP-Fortran-77.

--
Cheers - Dave.
How old is this cat? 54
72+ years so far. Still programming in Fortran (mainly F77, some F90)
about 5 or more hours/day.
I notice I criticise my older work and re-write it more elegantly and
completely.
I'm the mentioned hacker of the book, who played music on the IBM 1401
print chain.
First computer use was Mercury Star 1958; paper tape in/out CRT (not
screen), had to take boxes of double triodes to replace valves each 20-
minute run. Joind IBM; first Fortran was really non-published Fortan
III (4/1/61) so perhaps early Fortran IV.
Terence Wright
How old is this cat? 72
Bart Vandewoestyne wrote:

I'm 31, by most measures.  I'm not sure what age I am "as a Fortran
programmer", though.  :)

- Brooks, has been programming in Fortran for 13 years, with a
significant break in the middle.  I originally learned it from a book,
with no computer, in an RV in Alaska.


--
The "bmoses-nospam" address is valid; no unmunging needed.
How old is this cat? 31

31, about 10 years of Fortran.

Joost
How old is this cat? 31
In <XU9Gh.37362$Hg4.230461@phobos.telenet-ops.be> Bart Vandewoestyne:

[Snip...]


57--started with Watfor on IBM 360 in '68 or so as a sophomore in college.

--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
Kids jumping ship? Looking to hire an old-school type? Email me.
How old is this cat? 57
This post has made me feel really old - thanks a lot Bart!

Age 46. First used Fortran in 1979 at university then no programmming until
1995 when I relearnt Fortran and Delphi. Used Fortran on and off since then.
I expect to be retired long before a fully compliant F2008 compiler is
available - during which time there will have been at least 10 major
revisions to Delphi....

Paul Holden
How old is this cat? 46
On Mar 5, 1:31 am, Gib Bogle <b...@ihug.too.much.spam.co.nz> wrote:

<snip>


Yes, I mean to write that VB.NET is NOT compatible with Visual Basic 6
and earlier.

While I'm at it -- I am 36 and started programming in Fortran (77)
about 15 years ago on Unix workstations from Sun, IBM, and HP during
my PhD work in electronic structure physics. Only near the end of my
graduate work in 1997 did our group have access to a Fortran 90
compiler -- it was purchased on a single workstation, because of cost,
and F90 was regarded as a bit "exotic". Due to the efforts of compiler
writers, both volunteer and professional, and of hardware vendors,
Fortran 95 on (what are effectively) workstations is now quite
accessible -- thanks! Now I work for a quantitative hedge fund.

Bart, I think the person who started the survey is responsible for
eventually summarizing the results :).
How old is this cat? 36
On Mar 6, 5:01 pm, "PJH" <a...@hotmail.com> wrote:

Well, I'm 47 been using fortran since 1978 learning it on a Prime
computer using punch cards!  Man, does that show my age.  I am
currently using F90/95, which I really love.  I also am using VB.Net,
ADO.Net and Java.  In the past, I used a lot of C/C++.

My favorite language is F90/F95, though I get laughs when I tell the
"younger" crowd this.  Being a contractor, I've received the most $$
on my Fortran gigs.
How old is this cat? 47
I'm 22 and began programming in Fortran since 2004, initially working
on crop models. It's neat to be using a language that has such a long
history.
How old is this cat? 22
On Mar 3, 2:58 am, Bart Vandewoestyne
<MyFirstName.MyLastN...@telenet.be> wrote:

Age 54. Learned FORTRAN in late '62 or early '63 from a local
professor who was doing an experiment in teaching "new math". Since
then sporadic work on IBM 360 & 370, PDP-10, Univac 1108 and various
micro-computers.

-- Elliot

How old is this cat? 54
Bart Vandewoestyne wrote:


There used to be a distinction between "programmer" and "user." I've
been using fortran since 1963, but I've (almost) never written a program
for someone else to use, and have never been paid a cent for a program.
Last year I turned 70 and published my last paper that depended on
fortran calculations.  I doubt that I am representative of the
participants in this newsgroup, who mostly seem to be closer to
"programmer" than to "user."

The market for users who just want a math tool was perhaps never very
large, but at one time it was a large fraction of computer users, and
they had a big say in the evolution of  fortran up through f77.
How old is this cat? 70
I'm fifty.  First used Fortran about 35 years ago, IIRC.
But today I prefer C  :-O


--
pa at panix dot com
How old is this cat? 50
I've turned 39 for the 3rd time (that's 41 for you non-Jack Benny
fans) and first learned Fortran when I was 16. For the first time.

-- greg
How old is this cat? 41
In article <45eb4689$1@news.meer.net>, Greg Lindahl <lindahl@pbm.com> wrote:

In my case, 30th time (68), 25.

-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
How old is this cat? 68
Bart Vandewoestyne wrote:

This week I will celebrate my 70th birthday.  I learned Fortran for the
Control Data 1604 in 1960 in order to replace 3 hours on a Marchant desk
calculator to achieve a least sqares fit with a 1 minute run after 10
minutes punching the data cards.  Since then I have used Fortran
continuously and upgraded as compilers became available.  I am now using
a Fortran 98 compiler to help maintain a 150,000 line mechanical
simulation code.  The two young engineers they hired to replace me have
mostly taken over so I am mostly a part-time history advisor now.

How far does that raise the average?
   Bob Stryk
How old is this cat? 70

I am 46.  I have been programming in F66 / F77 since 1975.

I also program in C, C++, HTML, VBA, etc...

Lynn
How old is this cat? 46
On Mar 3, 7:58?am, Bart Vandewoestyne
<MyFirstName.MyLastN...@telenet.be> wrote:

62; learned in 1966, and have been using it essentially continously
ever since!

Dave Flower
How old is this cat? 62
I'm 49. Started with Ratfor in 1977 (QMC London thought that we would
learn structured programming better starting with Ratfor - fortran
proper was a 3rd year course!)

Regards,

Simon Geard
How old is this cat? 49
As if by magic, Bart Vandewoestyne appeared !


39. Definitely 39. Definitely not 40. Quite,

Ian
How old is this cat? 39
I am 45 years old, I learned FORTRAN 4 (or whatever dialect it
was back then) in 1982 (+/- 1 year (*)), learned FORTRAN 77 a couple
of years later. But I have been using Fortran 90/95 since, say,
1998 and am rather fond of its facilities.

Regards,

Arjen

(*) I am no good with years and have to reconstruct them
    from other information, such as the year I went to
    university - a number I had to write down a lot (whenever
    there was an examination for instance).
How old is this cat? 45
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> wrote:
[...]

60. I learned Fortran around 1970. Hated it at first, I had learned
Algol a year before.

--
Klaus Wacker              klaus.wacker@udo.edu
Experimentelle Physik V   http://www.physik.uni-dortmund.de/~wacker
Universitaet Dortmund     Tel.: +49 231 755 3587
D-44221 Dortmund          Fax:  +49 231 755 4547
How old is this cat? 60


8 years old as a Fortran programmer. Age 31.

Got through the Usenet preconditioner because of
having yet another legal/not-legal question to the
gurus.
How old is this cat? 31

I'm 58 (and a half) and have been programming in Fortran for 30 years (with
more and more C and C++ over the last few years). Started with Algol as an
undergrad, did Cobol and Assembler when I started a proper job. The move to
Fortran was like being set free!

Les
How old is this cat? 58
Uzytkownik Bart Vandewoestyne napisal:

I'm 30. about 7 year experience in Fortran.
How old is this cat? 30
I'm 60, but I assure everyone I don't look a day over 80. I wrote my
first FORTRAN program in FORTRAN II in about 1966.

El viejo programador (slowly fading away)
How old is this cat? 60
49 years old. started using Fortran in high school on an old IBM 1620 when I
was 16.
"Norman S. Clerman" <norm.opcon@fuse.net> wrote in message
news:f99c$45ec26cf$d8c4f0c6$11881@FUSE.NET...
How old is this cat? 49
I'm 43.  Started programming in 1973.  Fortran since 1981 (26 yrs).

I DREAM IN FORTRAN and it's a brilliant, beautiful landscape....

Ed
How old is this cat? 43

Turning 46 in a few months. After starting with BASIC on a Honeywell and a
Wang at school, during my student years worked as a sysadmin and supported
various FORTRAN programs, mostly from/for CERN, including re-writing one
package from scratch into proper F77. Then didn't use it for 15 years or so
until I wrote a face recognition program in F90 for SPEC CPU2000. Actually
managed to use it at work about a year ago for a little test generator, 
thanks
to DEC's sponsorship of a Fortran compiler for that SPEC project.

Jan
How old is this cat? 46
I'm 50.  Have been using Fortran off and on since 1975.  Only used
Fortran II for work but for fun I've used IV (66), V (some strange
dialect), 77, 90 and 95.  It has come a long way since Fortran II with
3 way jumps on all if statements.

I use Fortran and BASIC as an escape from the C family of languages.
Nice to play with something simple after a whole day buried in OO C++
stuff with its templates, multiple inheritence, virtual functions,
morphing and macros.

Still have a tatty 1978 copy of "Real Programmers don't eat
quiche" (they do everything in Fortran)
How old is this cat? 50
I'm 60 and retired, so do not count me. Thanks to Mike Metcalf I can
remember that I learned in the early 70th Fortran from McCracken as
well. Started on a CDC 6400(?) at STC The Hague (later NC3A).
Several years ago I started the Fortran Start Page.


Jan Verburgt
Fortran Start Page -  http://fortran.domeintje.net/

Domeintje is Dutch for little domain ....
How old is this cat? 60
I'm 44 (on average) and learned Fortran in 1982 (after
reading a small introduction to Algol 60...) on a
Univac 1108 using a punch card reader and line printer,
while my advisor was already allowed to use a green terminal.
 From that time on I almost daily had to work on code
in Fortran during the last 25 years.
I'm mainly using F95 today as a physicist for remote
sensing numerical applications and find it to be the
most appropriate language for such tasks. I had
several tries with C/C++ and Java, but they didn't
convince me to drop Fortran, especially after working
F90 compilers were available, which provide all those
features that I desperately missed in F77.
Besides of that, IDL (from ITTVIS, former RSI) is my
workhorse for plotting and other stuff that doesn't
fit well into Fortran.
And, of course, I would always recommend Lisp just for
fun, and to learn how different a programming language
can be !
--
Udo Grabowski
How old is this cat? 44
55, started Fortran, assembly language, Cobol and Algol in 1966 or 1967
on CDC-6400 & IBM 360 (and assembler only on PDP-8) (on my own, in
high school).

Wrote a guide to hacking OS/360 freshman year in college (1969/70) --
still have the card deck -- anybody got a lister?

Got certified as a Registered Business Programmer in 1972 (and never
wrote another line of Cobol).

Mostly doing F77 dialect of Fortran for number crunching and 8051
assembly for embedded systems stuff at present.

If I NEVER have to program another 4 bit micro again, I'll be happy.
How old is this cat? 55
I'm 64. I started in 1963 on entering grad school.
How old is this cat? 64
I'm 54.

Started FORTRAN IV in University on a Biochemistry BSc as a sideline in
1972. Continued attending lectures and tutorials for the remaining year
although the course ended after one term.

After a couple of years flying Jet Trainers in Her Majesty's Air force I
returned to college to get a biochemistry PhD. Got side-tracked into
computing, writing programs to do analysis of scintillation counter results
held on paper tape. After 3 years there were no 'real' results worth writing
a thesis for, but I walked into a job with a computer bureau by showing the
interviewers my code and the graphs it produced. That was 1980, and my
sideline is still keeping me well paid and extremely well amused.

--
Qolin
How old is this cat? 54
I'm 34, actively using Fortran since 1997. I think I was the
youngest regular on clf back in late 2000s, but I'm glad it's
not the case enymore...

--
 Jugoslav
How old is this cat? 34
"Learned" FORTRAN in summer of 1965 at Syracuse University on an IBM
7074(?).  Absolutely hated the rigid format requirements.

Tried again using FORTRAN IV(?) on IBM 360 in 1975/76.  Wrote a program
to aid in design of multi-plate roller thrust bearings - be darned if
the it didn't run right out of the box!  System admin was ticked when
the fool thing ran for a few minutes vainly searching for data which I
hadn't included - whoever expected the fool thing to run first time??!

Translated a bunch of NASA compressor design/analysis programs to MS
Professional Basic during the 80's and 90's.  We didn't have a Fortran
compiler and PBasic is very capable - I still think easier printed
output than Fortran.  Since I retired I've been learning g77 (Ubuntu
Linux) extended Fortran while re-coding a bunch of centrifugal
compressor design programs.  Really appreciate some of the extended
features and have no incentive to "upgrade".

Maybe 5 years of programming experience with Fortran altogether.  Oh,
yes, I'm going on 70 now.

David Rowell - KI4JVU
How old is this cat? 69

Age 52. Learned Fortran IV in 1973 at "We Are...Penn State!"
Still use Fortran for hydrodynamic and water quality simulation
modeling, but usually code pre- and post-processing software
using Pascal/Delphi. Only use Visual Basic when forced by
client or when debugging code written by others.
How old is this cat? 52
31.

I was initially exposed to F77 during an Explorer's project when I was
in high school, but I don't believe I actually learned it at that time.

On a coop placement in undergrad, sometime between 1994 and 1996, I
translated an old Fortran code to VB3, I recall it having a fair number
of F66-isms but I don't recall if it was totally F66.

During my time in industry between undergrad and grad school, I spent a
year maintaining a commercial application that had a "C++" (as in VC
1.52, blech!) front-end and a Fortran back-end.  That was when I really
learned to write Fortran code.  The code was written to LF77 so it was a
bit of a hybrid of F77 with significant F90-isms, and one of the early
things I did was port it to DVF.

And now I'm studying for a PhD in chemical engineering, doing molecular
modeling research, and our in-house software which I am partly
responsible for maintaining and extending is F95.
How old is this cat? 31

"MrAsm" <mrasm@usa.com> wrote in message
news:sqtsu2d95geru78suncnvugkq4qkiiv7ds@4ax.com...

The reason that experimental high-energy physics switched from FORTRAN 77 to
C++ are complex, but a principal one was that Fortran 90 lacked OO features
and in particular object persistance. That all happened 10 years ago.

Now for my details:

I first learned Fortran from McCracken in 1965, aged 24, in preparation for
working at CERN on a CDC 6600. I stayed 32 years. I wrote my first article
on Fortran for the CERN Computer Newsletter in 1976, on the differences
between FORTRAN 66 and 77 (in its draft form). My first book was published
in 1982. I was a member of X3J3 from 1984 to 1991. My most recent article
was in Fortran Forum last year, on the application of Fortran 95 to solving
and generating sudoku puzzles, a little diversion in my retirement. The
latest printing of the latest book was published last year. Another printing
is in preparation. I currently live in New York.

Regards,

Mike Metcalf

How old is this cat? 60
i am 26 year old and am using fortran for 2 years
How old is this cat? 26
On Mar 3, 3:58 am, Bart Vandewoestyne <MyFirstName.MyLastN...@telenet.be>
wrote:


I am 26. I have been programming in Fortran 90 for about 4 years (since
2002).

I have been writing code in C, C++ for about 9 years (since 1998).

I first learned pascal, then C, C++ and then Fortran 90. I am also familiar
with mathematica, matlab, maxima, python ....


raju

--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/
How old is this cat? 26

I'm 62, began programming in 1965 (MAD - Michigan Algorithm Decoder);
began using Fortran in 1971.

Jon D. Richards
How old is this cat? 62

I'm 52 and began Fortran programming in 1975. I'm developing Dislin
since 1986 in Fortran 77, porting it to C since 1993 and to Fortran 90
since 1996.

Regards,

Helmut
How old is this cat? 52
Age 30, Fortran experience of ... about 8 months?
Those years of coding C/C++ are still rather
obvious in my code, but I'm working on it :)

        Daniel
How old is this cat? 30

I'm 44 and I started learning Fortran in 1979, nearly 28 years ago.
I'm just starting my major movement from 77 to 95 style programming.
How old is this cat? 44
Age 59.  Started programming with UCSD Pascal (graduation
requirement :-) in about 1977.  First exposure to FORTRAN
was in a Numerical Methods class in the 2nd year of grad
school, and also took a PDP-11 Macro/Assembler course in the
same time frame.  Didn't start any serious programming until
about 1983 or so (using VAX Fortran), during my thesis work.
Got hooked and did mostly Fortran programming for the next 10-15
years...  Since then, my professional life has branched out and
most programming I do is with various scripting languages, and
only rarely do I get to work with compiled languages.  I count
Pascal, Fortran, C, C++, Macro, Perl, various shells (and DCL for
VMS) and TPU as languages in my tool chest. :-)

    -Ken
--
Ken & Ann Fairfield
What:  Ken dot And dot Ann
Where: Gmail dot Com
How old is this cat? 59
37, started at 21 when Fortran 77 was the language used in my MSc
course. I just missed out by a year or so on it being Fortran 90.

But what's really startled me about this thread is the ratio of the
sexes. I haven't read every single post, I admit, and it's hard to tell
from a couple of the names - but am I really the _only_ female Fortran
programmer on here?

Catherine.
How old is this cat? 37

  I am 43.
  I came to programming in Fortran, because a school friend asked me
  to teach him the language. I fetched a manual and teached it to myself,
  in order to be able to teach it to him. This was in 1987 or so.
  Before I was programming in Assembler (6809, 68000), Pascal, Modula2.
  From 1987 until about 2000, I mainly used Fortran, 77, and 90/95
  for my projects. Now I am using Ada for projects where I can chose the
  implementation language. When I can not chose Ada, I still use Fortran95.

  Warner
How old is this cat? 43
Apparently so, if we only count people following this thread and
willing to reply and actively programming in Fortran.

Reduce the last requirement to "having programmed in Fortran at
some point" and I can join you:

51, started at 18 when FORTRAN (66??) was the language used in my
university's "introduction to programming" course.  Didn't really
learn to program until a year or so later, in IBM 370 assembler.
Made a living writing FORTRAN (again, all-caps intentional) for
about five years in the mid-1980s.  Have tried to keep up a bit with
further developments in the language, but not with much success.
Lurk here out of -- nostalgia, I guess, and so that when the subject
of Fortran comes up in my current academic job I can be the lone
voice in the room saying something positive about Fortran.

I've been pleasantly surprised to find people in the their 20s and
30s responding in this thread, along with those from my era and before.

It *is* kind of interesting to find only one female voice, but --
Catherine, is this really so different from what you observe around
you in the workplace?  I teach CS at the university level, and while
the percentage of women in my classes is a little higher than in
this thread, it's pretty low ....

--
B. L. Massingill
ObDisclaimer:  I don't speak for my employers; they return the favor.
How old is this cat? 51
I can add my contribution to the statistics too.
Aged 41 and started my programming "career" as a youngster on a Texas
Instruments TI-58C desktop calculator. No that wasn't Fortran of course ;-)

First exposed to Fortran (77 with some 66isms I think) on a HP-UX box
about 15 years ago. That code was ported from Sintran on ND boxes. As an
educated computer scientist I found it just horrible at the time, so
avoided it as much as I could for many years. (A good strategy is to
learn as little as possible of the language.) At that time most of my
own programming was done in C.

My first bug in Fortran was exceeding the 72 column limit while still
compiling as syntactically correct yet with sooooo amazingly incorrect
behavior. I just wasn't prepared for meeting such a fossil in 1992, and
I'm just young enough to have missed the punched cards. It must have
been quite a shock at the time, since I remember it so well today!

In later years I've discovered how "persistent" legacy Fortran code
seems to be, even present in many commercial applications in 2007. My
attitude to the language has changed somewhat over the years though, and
I've come to value a few of its features too. Most of my everyday work
now is done in C++ on Windows, with inclusion of a considerable amount
of Fortran code to maintain as well.

--
     -+-Ben-+-
How old is this cat? 41
Toon Moene  <toon@moene.indiv.nluug.nl> wrote:


Not every time :-)

Well, maybe I should now 'fess up.  I'm a chemical engineer,
41 years old, and started out with Fortran 77 as a student on a
BS 3000 (MVS clone) mainframe in 1987.  I'm just young enough
never to have used punched cards, BTW.

Is everybody else here a physicist?
How old is this cat? 41
I'm 9 months into my pursuit of a Ph.D. in chemical engineering. I
went straight to grad school from undergraduate, and seeing as how I
took a year off during my B.S. to hike the Appalachian Trail, that
puts me at 23 years of age.

My Fortran experience pales in comparison to the average, seeing as
how I was given piles of legacy F77 code in January. I'm three months
in, and still delineating the archaic features from the new, flashy
ones. Were it up to me, I imagine I would be using C# or some
free .NET implementation. Or maybe I would've stayed lazy and
continued with the VBA.
How old is this cat? 23
Well, this *is* a fun competition, so I'll give my entry:

I was born 12 days after the first Fortran compiler manual was
published.  I've been using the language since 1979.

--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
Who's working on GNU Fortran:
http://gcc.gnu.org/ml/gcc/2007-01/msg00059.html
How old is this cat? 45
I'm 63.  I began learning Fortran in 1967, on a project to make some
broken Fortran II spaghetti code work in Fortran 66.  I worked for the
same company until 1985, and f66 was still the production compiler.  My
next employer did not move to C-centric systems until 1989.  I still
work on Fortran applications which go back to the f66 days.

My news server has deleted the head article of the thread, so I must
apologize for placing a reply here.
How old is this cat? 63

I'm 56, started using Fortran in 1968 as an undergraduate with teletype
and a paper tape punch/reader.

--
George N. White III  <aa056@chebucto.ns.ca>
How old is this cat? 56

  I'm 55 and started using Fortran in a IBM 113 with puched cards.


  Roxo

--
---------------- Non luctari, ludare -------------------+ WYSIWYG Editor ?
Fernando M. Roxo da Motta <roxo@roxo.org>               |  VI !!
Except where explicitly stated I speak on my own behalf.| I see text,
      ( Usu�rio Linux registrado #39505 )               | I get text !
How old is this cat? 55

I'm 64 and first used Fortran in 1964 when I had a summer job with IBM.

--
John Wingate
7/8/9
How old is this cat? 64
average is 47.74
--
WW


0
Reply invalid (121) 6/29/2007 1:46:58 AM

Wade Ward wrote:
> "dpb" <none@non.net> wrote in message news:f61dhi$pu9$1@aioe.org...
....
>> What compiler are you using?  Do you not have any documentation to read? 
>> I'm tempted but will resist the obvious single acronym response.
>>
> I'm using a compiler that I think is outstanding, Silverfrost's Plato 3.  I 
> wish I had a manual, so that I could f**in' read it.  ...

http://www.silverfrost.com/23/ftn95/support/ftn95_documentation.asp

--
0
Reply none1568 (6646) 6/29/2007 2:45:48 AM

"dpb" <none@non.net> wrote in message news:f61rrf$2vv$1@aioe.org...
> Wade Ward wrote:
>> "dpb" <none@non.net> wrote in message news:f61dhi$pu9$1@aioe.org...
> ...
>>> What compiler are you using?  Do you not have any documentation to read? 
>>> I'm tempted but will resist the obvious single acronym response.
>>>
>> I'm using a compiler that I think is outstanding, Silverfrost's Plato 3. 
>> I wish I had a manual, so that I could f**in' read it.  ...
>
> http://www.silverfrost.com/23/ftn95/support/ftn95_documentation.asp
Thanks for the excellent resource.  I wish I could promise that it would 
mean an end to my obtuse questions, but 4.3 megs of .chm file that will 
allow me to get into all kinds of media is likely only to multiply them. 
Tja.
--
WW 


0
Reply invalid (121) 6/29/2007 3:09:07 AM

Richard Maine wrote:
> Wade Ward <invalid@invalid.nyet> wrote:
>> "How old are you, as a Fortran programmer?"
> 
> Uh. We just had a longish thread on exactly that a few weeks ago. I
> think I even recall the slighly strange turn of phrase about "how old
> are you as a Fortran programmer". Better to go read that thread than
> start a new one. (Summary: your impression is wrong. The age range is
> quite large).

Actually, I think that _is_ a quote from the thread in question.  It 
looks like Wade's program reads in posts from said thread, prints them 
to the screen, and has the user then enter the age of the person in 
question, at which point it prints a running average.  What you're 
quoting from was some not-too-clearly-delineated program output.  :)

- Brooks


-- 
The "bmoses-nospam" address is valid; no unmunging needed.
0
Reply bmoses-nospam (1258) 6/29/2007 7:39:20 AM

"Brooks Moses" <bmoses-nospam@cits1.stanford.edu> wrote in message 
news:4684B728.5070907@cits1.stanford.edu...
> Richard Maine wrote:
>> Wade Ward <invalid@invalid.nyet> wrote:
>>> "How old are you, as a Fortran programmer?"
>>
>> Uh. We just had a longish thread on exactly that a few weeks ago. I
>> think I even recall the slighly strange turn of phrase about "how old
>> are you as a Fortran programmer". Better to go read that thread than
>> start a new one. (Summary: your impression is wrong. The age range is
>> quite large).
>
> Actually, I think that _is_ a quote from the thread in question.  It looks 
> like Wade's program reads in posts from said thread, prints them to the 
> screen, and has the user then enter the age of the person in question, at 
> which point it prints a running average.
I don't think it's a running average.  It's a having-run average using 
statistics with a judge.

>What you're quoting from was some not-too-clearly-delineated program 
>output.  :)
I wrote:
      end program harper7
      ! end source begin abridged output
      Hello guys
!end quote

I couldn't be any clearer if I were a buttonhook in the wellwater, (from the 
late, great Paul Ford.)
--
WW


0
Reply invalid (121) 6/30/2007 4:05:17 AM

"Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message 
news:5eirjlF385dnnU1@mid.individual.net...
> Wade Ward wrote:
>> "Ken Fairfield" <Ken@Napili.Fairfield.Home> wrote in message 
>> news:5eieloF38fav3U1@mid.individual.net...

>>> if (content(i)(1:1) /= '>')  ! Test first character not equal to ">"
>>> then
>>>    write (*, '(A)') trim(content(i))
>>> endif
>>>
>>> OK?
>> My compiler complains if I don't have the 'then' on the same line as the 
>> if, but it works like a charm.
>
> (What's the moticon for an embarrassed look? :-} )
Some people are doomed to having to discuss topics where we always fall a 
little shy of the mark.

> Sorry, yes, the "then" should be on the same line.  I've recently been
> writing some code in DECTPU which, as a common style, puts the "then"
> on it's own line, at least for other than one-liners.  The same style
> is used for block-if-then-else-endif in DCL.  I know, you didn't ask...
> :-)
>
> Also, Richard Maine's example of doing this in a single statement is
> another alternative, but I sort of assumed you might want to do more
> than just the single write.
What if, instead, I wanted to add a '<' to content(i) as its first element? 
Anybody worth their weight in salt is going to get a 100-char array into a 
101-char array.  Matter of fact, let me add this array myself:

program harper8
CHARACTER(100) :: content(200)
CHARACTER(101) :: parse1(200)
INTEGER        :: i,nmax , n_Files, j, k
CHARACTER(*), PARAMETER :: FMTSTRING = '("m",i0,".txt")'
CHARACTER(256) :: Filename

integer, dimension(85) :: age
real :: sum, avg

n_Files = 84
nmax = size(content)
OPEN(11, File="output1.txt",STATUS='REPLACE')

DO j = 1, n_Files
  WRITE(Filename,FMT=FMTSTRING) j
  OPEN(10,FILE=Filename,STATUS='OLD')
    DO i = 1,nmax
      read(10,'(a)',END=666,ERR=999) content(i)
!$$$$$$
!$$$$$$       if (content(i)(1:1) /= '>')  then
!$$$$$$       write (*, '(A)') trim(content(i))
!$$$$$$       write (11, '(A)') trim(content(i))
!$$$$$$       endif

! pseudo code
! do ii 1, 200
! make the first char of parse1(ii) '<'
! map value of ii to ++ii in transfer from content to parse1
!end do
    END DO
  666 CLOSE(10)
  write (*,'(a)', advance='no') "How old is this cat? "
  write (11,'(a)', advance='no') "How old is this cat? "
  read (*, '(i2)') age(j)
  write (11,'(i2)') age(j)
  do k=1, 30
    write(*,*)
    end do
end do
sum = 0.0
do k = 1, n_Files
  sum = sum + age(k)
  end do
  avg=sum/n_Files
   write (*,'(f5.2)') avg
   write (11, '(a)', advance='no') "average is "
   write (11, '(f5.2)') avg

close(11)

  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program harper8
! end source
--
WW


0
Reply invalid (121) 7/1/2007 8:46:30 PM

Wade Ward wrote:
....

> What if, instead, I wanted to add a '<' to content(i) as its first element? 
....

Something like

string101 = '<'//string100

would be one way.

equivalent to

string101 = '<'
string101(2:) = string100

--
0
Reply none1568 (6646) 7/1/2007 9:01:17 PM

"dpb" <none@non.net> wrote in message news:f694pi$se2$1@aioe.org...
> Wade Ward wrote:
> ...
>
>> What if, instead, I wanted to add a '<' to content(i) as its first 
>> element?
> ...
>
> Something like
>
> string101 = '<'//string100
>
> would be one way.
>
> equivalent to
>
> string101 = '<'
> string101(2:) = string100
>
> --
Works like a charm:

program harper8
CHARACTER(100) :: content(200)
CHARACTER(101) :: parse1(200)
INTEGER        :: i,nmax , n_Files, j, k
CHARACTER(*), PARAMETER :: FMTSTRING = '("m",i0,".txt")'
CHARACTER(256) :: Filename

integer, dimension(85) :: age
real :: sum, avg

n_Files = 3
nmax = size(content)
OPEN(11, File="output3.txt",STATUS='REPLACE')

DO j = 1, n_Files
  WRITE(Filename,FMT=FMTSTRING) j
  OPEN(10,FILE=Filename,STATUS='OLD')
    DO i = 1,nmax
      read(10,'(a)',END=666,ERR=999) content(i)
      ! string101 = '<'//string100
      parse1(i) ='<'//content(i)
      write (11, '(a)') trim(parse1(i))
    END DO
  666 CLOSE(10)
end do
close(11)
  IF(i>nmax) WRITE(*,*)'Warning: '//trim(filename)// &
       ' has more than',nmax-1,' lines.'
STOP 'No error found'
999 STOP 'Error during reading'
end program harper8
! end source begin output
<Hello guys,
<
<Now that it's weekend and we don't need to program anymore (do
<we? ;-) i thought it was time to ask a fun question... something
<that I've been wondering about for quite some time now...
<
<We all know that FORTRAN/Fortran is an 'old' language and i have
<the impression that in some areas -despite the new F2003 standard-
<Fortran programmers are becoming rare, almost an extinct species...
<
<I have the impression that not much 'younger ones' really get to
<learn and appreciate the language.
<
<So just to check that... here's my question:
<
<"How old are you, as a Fortran programmer?"
<
<Feel free to respond, I'll collect the ages and report on the
<average afterwards :-)
<
<As for myself, I am 28 but will be 29 this month :-)
<
<Best wishes,
<Bart
<
<--
<"Share what you know.  Learn what you don't."
<I'm 32 years old and have been using Fortran for almost 10 years.
<Bart Vandewoestyne schrieb:
<>
<> Hello guys,
<>
<> Now that it's weekend and we don't need to program anymore (do
<> we? ;-) i thought it was time to ask a fun question... something
<> that I've been wondering about for quite some time now...
<>
<> We all know that FORTRAN/Fortran is an 'old' language and i have
<> the impression that in some areas -despite the new F2003 standard-
<> Fortran programmers are becoming rare, almost an extinct species...
<>
<> I have the impression that not much 'younger ones' really get to
<> learn and appreciate the language.
<>
<> So just to check that... here's my question:
<>
<> "How old are you, as a Fortran programmer?"
<>
<> Feel free to respond, I'll collect the ages and report on the
<> average afterwards :-)
<>
<> As for myself, I am 28 but will be 29 this month :-)
<>
<> Best wishes,
<> Bart
<>
<> --
<>         "Share what you know.  Learn what you don't."
<
<I'm almost 50 years old,
<using Fortran for more than half of my life ;-)
<
<Fortran is the choice for number crunching,
<also a lot of old but good numerical calculations
<is written in Fortran.
<
<Toni (Austria)
!end output
I'll want those arrows facing the other way.  One thing I don't see is why 
the output is limited to 2 files, as opposed to the hard-coded three.
--
WW 


0
Reply invalid (121) 7/1/2007 11:53:38 PM

27 Replies
51 Views

(page loaded in 0.267 seconds)

Similiar Articles:


















7/23/2012 2:17:28 AM


Reply: