home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / edu / 1388 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.0 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!yale!gumby!destroyer!news.iastate.edu!iscsvax.uni.edu!bohy6489
  2. From: bohy6489@iscsvax.uni.edu
  3. Newsgroups: comp.edu
  4. Subject: Re: Small Language Wanted
  5. Message-ID: <1992Aug28.083237.6312@iscsvax.uni.edu>
  6. Date: 28 Aug 92 13:32:37 GMT
  7. References: <1992Aug25.095623.18808@news.Hawaii.Edu> <8749@amsaa-cleo.brl.mil>
  8. Followup-To: comp.edu
  9. Distribution: na
  10. Organization: University of Northern Iowa
  11. Lines: 35
  12.  
  13. In article <8749@amsaa-cleo.brl.mil>, mcohen@amsaa-cleo.brl.mil (Marty Cohen) writes:
  14. > In Fortran 77 there is no way to code a while loop without using a GOTO.
  15.                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  16.  
  17. First off, the arguement was about *computed* GOTO's, which are *nothing* like
  18. your average everyday GOTO.  Secondly, there are these really cool things
  19. called COMMENTS (excuse the shout) that allow you to do things like:
  20.  
  21. C       while (i <= 3) do
  22.  
  23.       5 IF (I .LE. 3) THEN GOTO 10
  24.         GOTO 20
  25.      10 (insert your favorite thing to do if I <= 3 here)
  26.         (more loop body)
  27.         GOTO 5
  28.      20 CONTINUE
  29.  
  30. C       Isn't that cool?
  31.  
  32. In fact, even though I have taught FORTRAN in the past using VMS FORTRAN (which
  33. has DO WHILE loops), I use this.  It helps people *SEE* just how these loops
  34. work, rather than drawing a bunch of arrows on the board or whatever.  I always
  35. followup with DO WHILE, and encourage them to use DO WHILE.
  36.  
  37. > -- 
  38. > Marty Cohen  mcohen@brl.mil  {uunet|rutgers}!brl!mcohen
  39. > Custom House Rm 800, Phila. PA 19106 (215)597-8377 Fax (215)597-2240
  40.  
  41. ===============================================================================
  42. Jim Bohy                                        | "If you have to ask, you'll
  43. Graduate Student - Computer Science Education   |  never know..."
  44. University of Northern Iowa                     | 
  45. Cedar Falls, IA  50614                          | - Louis Armstrong, when asked
  46. bohy@att1.uni.edu                               |   what jazz is.
  47. ===============================================================================
  48.