home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4325 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.1 KB  |  46 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!gumby!wupost!cs.uiuc.edu!sparc0b!ctaylor
  3. From: ctaylor@cs.uiuc.edu (Conrad W Taylor)
  4. Subject: Print characters on one line without newline...???
  5. Message-ID: <BxtnK6.23s@cs.uiuc.edu>
  6. Sender: news@cs.uiuc.edu
  7. Organization: University of Illinois at Urbana-Champaign
  8. Date: Mon, 16 Nov 1992 18:33:42 GMT
  9. Lines: 35
  10.  
  11.          I'm writting this PrintX routine that is to print
  12. the letter X n times on one line without any spaces and
  13. newline.  My PrintX routine looks like this:
  14.  
  15.       SUBROUTINE PrintX(XCOUNT)
  16.         INTEGER XCOUNT
  17.  
  18.         INTEGER i
  19.  
  20.         DO 10 i, XCOUNT
  21.           PRINT 20
  22.   10    CONTINUE
  23.   20    FORMAT(1X, 'X')
  24.  
  25.         PRINT *
  26.         
  27.         RETURN
  28.         END
  29.  
  30. correct: XXXXX...X
  31. incorrect: X
  32.            X
  33.            X
  34.            .
  35.            .
  36.            X
  37.  
  38. This routine only prints one 'X' on n lines and I want it to print
  39. n X's on one line without any spaces in between and without a new-
  40. line character.  Could someone explain what I might be doing wrong?
  41. Thanks in advance to all that reply to this e-mail.
  42.  
  43. -Conrad
  44.  
  45.  
  46.