From: twpierce@unix.amherst.edu (Tim Pierce)
Subject: Re: Real men don't use Pascal
Organization: Amherst College, Amherst MA
Date: Thu, 1 Oct 1992 20:23:09 GMT

In article <ERU.92Sep30180929@tnso04.tele.nokia.fi> eru@tnso04.tele.nokia.fi (Erkki Ruohtula) writes:
>In article <1992Sep29.042314.12022@cheops.qld.tne.oz.au> logier@cheops.qld.tne.oz.au (Rob Logie) writes:
>>Real Programmers Don't Use PASCAL
>...repost of famous article deleted...
>
>Thanks, but this version is missing the bibliography! Is there a
>more complete ASCII file around?

Here's nroff output from coma.cs.tu-berlin.de:/pub/nickel/real.tr.
You may want to "sed -e 's/.^H//g'" if your terminal or printer is not
up to overstriking or underlining.

              ``Real Programmers Don't Use PASCAL''

         Ed Post, ``Real Programmers Don't Use Pascal'',
      DATAMATION, July 1983, pp. 263-265 (Readers' Forum).

        Back in the good old days - the ``Golden Era'' of comput-
ers,  it  was  easy  to separate the men from the boys (sometimes
called ``Real Men'' and ``Quiche  Eaters''  in  the  literature).
During  this  period,  the Real Men were the ones that understood
computer programming, and the Quiche Eaters were  the  ones  that
didn't.   A  real  computer  programmer  said things like ``DO 10
I=1,10'' and ``ABEND'' (they actually talked in capital  letters,
you  understand),  and  the  rest  of  the world said things like
``computers are too complicated for me'' and ``I can't relate  to
computers - they're so impersonal''.  (A previous work [1] points
out that Real Men don't ``relate'' to anything, and aren't afraid
of being impersonal.)

        But, as usual, times change.  We are faced today  with  a
world  in  which little old ladies can get computers in their mi-
crowave ovens, 12-year-old kids can blow Real Men out of the  wa-
ter  playing  Asteroids  and Pac-Man, and anyone can buy and even
understand their very own Personal Computer.  The Real Programmer
is  in  danger  of  becoming  extinct, of being replaced by high-
school students with TRASH-80's.

        There is a  clear  need  to  point  out  the  differences
between  the typical high-school junior Pac-Man player and a Real
Programmer.  If this difference is made clear, it will give these
kids  something to aspire to - a role model, a Father Figure.  It
will also help explain to the employers of Real  Programmers  why
it  would  be  a mistake to replace the Real Programmers on their
staff with 12-year-old Pac-Man players (at a considerable  salary
savings).

Languages

        The easiest way to tell a Real Programmer from the  crowd
is  by  the programming language he (or she) uses.  Real Program-
mers use FORTRAN.  Quiche Eaters use PASCAL.  Nicklaus Wirth, the
designer  of PASCAL, gave a talk once at which he was asked ``How
do you pronounce your name?''.  He replied, ``You can either call
me  by  name,  pronouncing  it  `Veert',  or  call  me  by value,
`Worth'.'' One can tell immediately from this comment that  Nick-
laus Wirth is a Quiche Eater.  The only parameter passing mechan-
ism endorsed by Real Programmers is call-by-value-return, as  im-
plemented  in  the  IBM\370 FORTRAN-G and H compilers.  Real pro-
grammers don't need all these abstract concepts to get their jobs
done  -  they  are  perfectly happy with a keypunch, a FORTRAN IV
compiler, and a beer.

   o+ Real Programmers do List Processing in FORTRAN.

   o+ Real Programmers do String Manipulation in FORTRAN.

   o+ Real Programmers do Accounting (if they do  it  at  all)  in
     FORTRAN.

   o+ Real Programmers do Artificial Intelligence programs in FOR-
     TRAN.

        If you  can't  do  it  in  FORTRAN,  do  it  in  assembly
language.   If  you  can't  do  it in assembly language, it isn't
worth doing.

Structured Programming

        The academics in computer science have  gotten  into  the
``structured programming'' rut over the past several years.  They
claim that programs are more easily understood if the  programmer
uses some special language constructs and techniques.  They don't
all agree on exactly which constructs, of course, and  the  exam-
ples  they  use to show their particular point of view invariably
fit on a single page of some obscure journal or another - clearly
not  enough  of an example to convince anyone.  When I got out of
school, I thought I was the best  programmer  in  the  world.   I
could write an unbeatable tic-tac-toe program, use five different
computer languages, and create  1000-line  programs  that  _w_o_r_k_e_d
(Really!).  Then I got out into the Real World.  My first task in
the Real World was to read and understand a 200,000-line  FORTRAN
program,  then speed it up by a factor of two.  Any Real Program-
mer will tell you that all the Structured  Coding  in  the  world
won't  help  you  solve  a  problem  like  that - it takes actual
talent.  Some quick observations on Real Programmers  and  Struc-
tured Programming:

   o+ Real Programmers aren't afraid to use GOTO'_s.

   o+ _R_e_a_l _P_r_o_g_r_a_m_m_e_r_s _c_a_n _w_r_i_t_e _f_i_v_e-_p_a_g_e-_l_o_n_g _D_O  loops  without
     getting confused.

   o+ Real Programmers like Arithmetic IF _s_t_a_t_e_m_e_n_t_s -  _t_h_e_y  _m_a_k_e
     _t_h_e _c_o_d_e _m_o_r_e _i_n_t_e_r_e_s_t_i_n_g.

   o+ _R_e_a_l _P_r_o_g_r_a_m_m_e_r_s _w_r_i_t_e _s_e_l_f-_m_o_d_i_f_y_i_n_g  _c_o_d_e,  _e_s_p_e_c_i_a_l_l_y  _i_f
     _t_h_e_y _c_a_n _s_a_v_e _2_0 _n_a_n_o_s_e_c_o_n_d_s _i_n _t_h_e _m_i_d_d_l_e _o_f _a _t_i_g_h_t _l_o_o_p.

   o+ _R_e_a_l _P_r_o_g_r_a_m_m_e_r_s _d_o_n'_t _n_e_e_d _c_o_m_m_e_n_t_s - _t_h_e _c_o_d_e _i_s _o_b_v_i_o_u_s.

   o+ _S_i_n_c_e _F_O_R_T_R_A_N _d_o_e_s_n'_t _h_a_v_e _a _s_t_r_u_c_t_u_r_e_d _I_F, REPEAT ...   _U_N_-
     _T_I_L, or CASE _s_t_a_t_e_m_e_n_t, _R_e_a_l _P_r_o_g_r_a_m_m_e_r_s _d_o_n'_t _h_a_v_e _t_o _w_o_r_r_y
     _a_b_o_u_t _n_o_t _u_s_i_n_g _t_h_e_m.  _B_e_s_i_d_e_s, _t_h_e_y _c_a_n _b_e  _s_i_m_u_l_a_t_e_d  _w_h_e_n
     _n_e_c_e_s_s_a_r_y _u_s_i_n_g _a_s_s_i_g_n_e_d _G_O_T_O's.

        Data Structures have also gotten a lot of  press  lately.
Abstract  Data  Types,  Structures,  Pointers, Lists, and Strings
have become  popular  in  certain  circles.   Wirth  (the  above-
mentioned  Quiche  Eater)  actually wrote an entire book [2] con-
tending that you could write a program based on data  structures,
instead  of  the other way around.  As all Real Programmers know,
the only useful data structure is  the  Array.   Strings,  lists,
structures,  sets - these are all special cases of arrays and can
be treated that way just as easily without messing up  your  pro-
gramming  language  with  all  sorts of complications.  The worst
thing about fancy data types is that you have  to  declare  them,
and  Real  Programming  Languages,  as we all know, have implicit
typing based on the first letter of the (six character)  variable
name.

Operating Systems

        What kind of operating system is used by a Real  Program-
mer?   CP/M?  God  forbid  -  CP/M, after all, is basically a toy
operating system.  Even little old ladies and grade  school  stu-
dents can understand and use CP/M.

        Unix is a lot more complicated of course  -  the  typical
Unix  hacker  never can remember what the PRINT command is called
this week -, but when it gets right down to it, Unix is a  glori-
fied  video  game.  People don't do Serious Work on Unix systems:
they send jokes around the world on UUCP-net and write  adventure
games and research papers.

        No, your Real Programmer uses OS\370.  A good  programmer
can  find  and understand the description of the IJK305I error he
just got in his JCL manual.  A great  programmer  can  write  JCL
without referring to the manual at all.  A truly outstanding pro-
grammer can find bugs buried in a 6 megabyte  core  dump  without
using a hex calculator.  (I have actually seen this done.)

        OS is a truly remarkable operating system.  It's possible
to  destroy days of work with a single misplaced space, so alert-
ness in the programming staff is encouraged.  The best way to ap-
proach the system is through a keypunch.  Some people claim there
is a Time Sharing system that runs on OS\370, but  after  careful
study I have come to the conclusion that they were mistaken.

Programming Tools

        What kind of  tools  does  a  Real  Programmer  use?   In
theory,  a  Real Programmer could run his programs by keying them
into the front panel of the computer.  Back in the days when com-
puters  had  front  panels,  this was actually done occasionally.
Your typical Real Programmer knew the entire bootstrap loader  by
memory in hex, and toggled it in whenever it got destroyed by his
program.  (Back then, memory was memory - it didn't go away  when
the power went off.  Today, memory either forgets things when you
don't want it to, or remembers things long after  they're  better
forgotten.) Legend has it that Seymore Cray, inventor of the Cray
I supercomputer and most of Control  Data's  computers,  actually
toggled  the  first  operating  system  for the CDC7600 in on the
front panel from memory when it was first powered  on.   Seymore,
needless to say, is a Real Programmer.

        One of my favorite Real Programmers was  a  systems  pro-
grammer  for  Texas  Instruments.  One day he got a long distance
call from a user whose system had crashed in the middle of saving
some  important work.  Jim was able to repair the damage over the
phone, getting the user to toggle in disk I/O instructions at the
front  panel,  repairing  system  tables in hex, reading register
contents back over the phone.  The moral of this story:  while  a
Real  Programmer  usually  includes a keypunch and lineprinter in
his toolkit, he can get along with just a front panel and a tele-
phone in emergencies.

        In some companies, text editing no longer consists of ten
engineers  standing in line to use an 029 keypunch.  In fact, the
building I work in doesn't contain a single keypunch.   The  Real
Programmer in this situation has to do his work with a ``text ed-
itor'' program.  Most systems  supply  several  text  editors  to
select  from, and the Real Programmer must be careful to pick one
that reflects his personal style.  Many people believe  that  the
best  text  editors  in the world were written at Xerox Palo Alto
Research Center for use on their Alto and Dorado  computers  [3].
Unfortunately, no Real Programmer would ever use a computer whose
operating system is called SmallTalk,  and  would  certainly  not
talk to the computer with a mouse.

        Some of the concepts in these Xerox editors have been in-
corporated  into editors running on more reasonably named operat-
ing systems - EMACS and VI being two.  The problem with these ed-
itors  is  that  Real Programmers consider ``what you see is what
you get'' to be just as bad a concept in Text Editors as it is in
women.   No,  the Real Programmer wants a ``you asked for it, you
got it'' text editor - complicated, cryptic, powerful,  unforgiv-
ing, dangerous.  TECO, to be precise.

        It has been observed that a TECO  command  sequence  more
closely resembles transmission line noise than readable text [4].
One of the more entertaining games to play with TECO is  to  type
your  name  in  as  a command line and try to guess what it does.
Just about any possible typing error while talking with TECO will
probably  destroy  your program, or even worse - introduce subtle
and mysterious bugs in a once working subroutine.

        For this reason, Real Programmers are reluctant to  actu-
ally  edit a program that is close to working.  They find it much
easier to just patch the binary object  code  directly,  using  a
wonderful  program  called SUPERZAP (or its equivalent on non-IBM
machines).  This works so well that many working programs on  IBM
systems  bear  no relation to the original FORTRAN code.  In many
cases, the original source code is no longer available.  When  it
comes  time  to  fix  a  program like this, no manager would even
think of sending anything less than a Real Programmer to  do  the
job  -  no  Quiche  Eating  structured programmer would even know
where to start.  This is called ``job security''.

        Some programming tools NOT used by Real Programmers:

   o+ FORTRAN preprocessors like  MORTRAN  and  RATFOR.   The  Cu-
     isinarts of programming - great for making Quiche.  See com-
     ments above on structured programming.

   o+ Source language debuggers.  Real Programmers can  read  core
     dumps.

   o+ Compilers with array bounds checking.  They stifle creativi-
     ty,  destroy  most  of the interesting uses for EQUIVALENCE,
     and make it impossible to modify the operating  system  code
     with  negative subscripts.  Worst of all, bounds checking is
     inefficient.

   o+ Source code maintenance systems.  A  Real  Programmer  keeps
     his  code  locked up in a card file, because it implies that
     its owner cannot leave his important programs unguarded [5].

The Real Programmer At Work

        Where does the typical Real Programmer work?   What  kind
of programs are worthy of the efforts of so talented an individu-
al?  You can be sure that no Real Programmer would be caught dead
writing accounts-receivable programs in COBOL, or sorting mailing
lists for People magazine.  A  Real  Programmer  wants  tasks  of
earth-shaking importance (literally!).

   o+ Real Programmers work for Los  Alamos  National  Laboratory,
     writing  atomic  bomb simulations to run on Cray I supercom-
     puters.

   o+ Real Programmers work  for  the  National  Security  Agency,
     decoding Russian transmissions.

   o+ It was largely due to the efforts of thousands of Real  Pro-
     grammers  working for NASA that our boys got to the moon and
     back before the Russkies.

   o+ Real Programmers  are  at  work  for  Boeing  designing  the
     operating systems for cruise missiles.

        Some of the most awesome Real Programmers of all work  at
the  Jet  Propulsion Laboratory in California.  Many of them know
the entire operating system of the Pioneer and Voyager spacecraft
by  heart.  With a combination of large ground-based FORTRAN pro-
grams and small spacecraft-based assembly language programs, they
are able to do incredible feats of navigation and improvisation -
hitting ten-kilometer wide windows at Saturn after six  years  in
space,  repairing  or bypassing damaged sensor platforms, radios,
and batteries.  Allegedly, one Real Programmer managed to tuck  a
pattern-matching  program  into  a  few  hundred  bytes of unused
memory in a Voyager spacecraft that searched  for,  located,  and
photographed a new moon of Jupiter.

        The current plan for the Galileo spacecraft is to  use  a
gravity  assist trajectory past Mars on the way to Jupiter.  This
trajectory passes within 80 +/-3 kilometers  of  the  surface  of
Mars.   Nobody  is  going  to trust a PASCAL program (or a PASCAL
programmer) for navigation to these tolerances.

        As you can tell, many of  the  world's  Real  Programmers
work  for  the  U.S.  Government - mainly the Defense Department.
This is as it should be.  Recently, however, a  black  cloud  has
formed on the Real Programmer horizon.  It seems that some highly
placed Quiche Eaters at the Defense Department decided  that  all
Defense programs should be written in some grand unified language
called ``Ada'' (DoD).  For a while, it seemed that Ada  was  des-
tined  to become a language that went against all the precepts of
Real Programming - a language with  structure,  a  language  with
data  types, strong typing, and semicolons.  In short, a language
designed to cripple the creativity of the typical  Real  Program-
mer.   Fortunately,  the  language  adopted by DoD has enough in-
teresting features to make it approachable - it's incredibly com-
plex,  includes methods for messing with the operating system and
rearranging memory, and Edsgar  Dijkstra  doesn't  like  it  [6].
(Dijkstra,  as  I'm sure you know, was the author of ``GoTos Con-
sidered Harmful'' - a landmark work in  programming  methodology,
applauded  by  PASCAL  programmers  and Quiche Eaters alike.) Be-
sides, the determined Real Programmer can write FORTRAN  programs
in any language.

        The Real Programmer might compromise his  principles  and
work  on  something slightly more trivial than the destruction of
life as we know it, providing there's enough money in it.   There
are  several  Real Programmers building video games at Atari, for
example.  (But not playing them - a Real Programmer knows how  to
beat  the  machine  every  time:  no challenge in that.) Everyone
working at LucasFilm is a Real Programmer.  (It would be crazy to
turn down the money of fifty million Star Trek fans.) The propor-
tion of Real Programmers in Computer Graphics is  somewhat  lower
than the norm, mostly because nobody has found a use for computer
graphics yet.  On the other hand, all computer graphics  is  done
in  FORTRAN,  so there are a fair number of people doing graphics
in order to avoid having to write COBOL programs.

The Real Programmer At Play

        Generally, the Real Programmer  plays  the  same  way  he
works  -  with  computers.   He is constantly amazed that his em-
ployer actually pays him to do what he would  be  doing  for  fun
anyway  (although  he  is careful not to express this opinion out
loud).  Occasionally, the Real Programmer does step  out  of  the
office for a breath of fresh air and a beer or two.  Some tips on
recognizing Real Programmers away from the computer room:

   o+ At a party, the Real Programmers are the ones in the  corner
     talking  about  operating  system  security  and  how to get
     around it.

   o+ At a football game, the Real Programmer is the one comparing
     the  plays  against his simulations printed on 11 by 14 fan-
     fold paper.

   o+ At the  beach,  the  Real  Programmer  is  the  one  drawing
     flowcharts in the sand.

   o+ At a funeral, the Real Programmer is the one  saying  ``Poor
     George.   And  he almost had the sort routine working before
     the coronary.''

   o+ In a grocery store, the Real Programmer is the one  who  in-
     sists  on  running  the cans past the laser checkout scanner
     himself, because he never could trust keypunch operators  to
     get it right the first time.

The Real Programmer's Natural Habitat

        What sort of environment does the Real  Programmer  func-
tion  best in?  This is an important question for the managers of
Real Programmers.  Considering the amount of money  it  costs  to
keep  one  on  the staff, it's best to put him (or her) in an en-
vironment where he can get his work done.

        The typical Real Programmer lives in front of a  computer
terminal.  Surrounding this terminal are:

   o+ Listings of all programs the Real Programmer has ever worked
     on,  piled in roughly chronological order on every flat sur-
     face in the office.

   o+ Some half-dozen or so partly filled  cups  of  cold  coffee.
     Occasionally,  there will be cigarette butts floating in the
     coffee.  In some cases, the cups will contain Orange Crush.

   o+ Unless he is very good, there will be copies of the  OS  JCL
     manual and the Principles of Operation open to some particu-
     larly interesting pages.

   o+ Taped to the wall is a line-printer Snoopy calendar for  the
     year 1969.

   o+ Strewn about the  floor  are  several  wrappers  for  peanut
     butter filled cheese bars - the type that are made pre-stale
     at the bakery so they can't get any worse while  waiting  in
     the vending machine.

   o+ Hiding in the top left-hand drawer of the desk is a stash of
     double-stuff Oreos for special occasions.

   o+ Underneath the Oreos is a flowcharting template, left  there
     by  the  previous occupant of the office.  (Real Programmers
     write  programs,  not  documentation.   Leave  that  to  the
     maintenance people.)

        The Real Programmer is capable of working 30, 40, even 50
hours  at a stretch, under intense pressure.  In fact, he prefers
it that way.  Bad response time doesn't bother the Real  Program-
mer  - it gives him a chance to catch a little sleep between com-
piles.  If there is not enough schedule pressure on the Real Pro-
grammer,  he  tends to make things more challenging by working on
some small but interesting part of the problem for the first nine
weeks,  then finishing the rest in the last week, in two or three
50-hour marathons.  This not only impresses the hell out  of  his
manager,  who  was despairing of ever getting the project done on
time, but creates a convenient excuse for not doing the  documen-
tation.  In general:

   o+ No Real Programmer works 9 to 5 (unless  it's  the  ones  at
     night).

   o+ Real Programmers don't wear neckties.

   o+ Real Programmers don't wear high-heeled shoes.

   o+ Real Programmers arrive at work in time for lunch [9].

   o+ A Real Programmer might or might not know his  wife's  name.
     He  does,  however,  know  the entire ASCII (or EBCDIC) code
     table.

   o+ Real Programmers don't know how  to  cook.   Grocery  stores
     aren't  open at three in the morning.  Real Programmers sur-
     vive on Twinkies and coffee.

The Future

        What of the future?  It is a matter of  some  concern  to
Real  Programmers that the latest generation of computer program-
mers are not being brought up with the same outlook  on  life  as
their  elders.   Many  of  them have never seen a computer with a
front panel.  Hardly anyone graduating from school these days can
do  hex arithmetic without a calculator.  College graduates these
days are soft - protected from the realities  of  programming  by
source  level debuggers, text editors that count parentheses, and
``user friendly'' operating systems.  Worst of all, some of these
alleged  ``computer  scientists''  manage  to get degrees without
ever learning FORTRAN!  Are we destined to become an industry  of
Unix hackers and PASCAL programmers?

        From my experience, I can only report that the future  is
bright  for Real Programmers everywhere.  Neither OS\370 nor FOR-
TRAN show any signs of dying out, despite all the efforts of PAS-
CAL  programmers  the  world over.  Even more subtle tricks, like
adding structured coding constructs to FORTRAN have  failed.   Oh
sure,  some  computer  vendors have come out with FORTRAN 77 com-
pilers, but every one of them has a way of converting itself back
into  a  FORTRAN  66  compiler at the drop of an option card - to
compile DO loops like God meant them to be.

        Even Unix might not be as bad on Real Programmers  as  it
once  was.   The  latest  release of Unix has the potential of an
operating system worthy of any Real Programmer  -  two  different
and subtly incompatible user interfaces, an arcane and complicat-
ed teletype driver, virtual memory.  If you ignore the fact  that
it's  ``structured'',  even 'C' programming can be appreciated by
the Real Programmer: after all, there's no type  checking,  vari-
able names are seven (ten? eight?) characters long, and the added
bonus of the Pointer data type is thrown in  -  like  having  the
best  parts  of FORTRAN and assembly language in one place.  (Not
to mention some of the more creative uses for #define.)

        No, the future isn't all that bad.  Why, in the past  few
years,  the  popular  press  has even commented on the bright new
crop of computer nerds and hackers ([7] and [8])  leaving  places
like  Stanford and M.I.T. for the Real World.  From all evidence,
the spirit of Real Programming lives on in these  young  men  and
women.  As long as there are ill-defined goals, bizarre bugs, and
unrealistic schedules, there will be Real Programmers willing  to
jump  in  and  Solve  The  Problem,  saving the documentation for
later.  Long live FORTRAN!

Acknowlegement

        I would like to thank Jan E., Dave S., Rich G., Rich  E.,
for  their help in characterizing the Real Programmer, Heather B.
for the illustration, Kathy  E.  for  putting  up  with  it,  and
atd!avsdS:mark for the initial inspiration.

References

   o+ Feirstein, B., ``Real Men  don't  Eat  Quiche'',  New  York,
     Pocket Books, 1982.

   o+ Wirth, N., ``Algorithms  +  Data  Structures  =  Programs'',
     Prentice Hall, 1976.

   o+ Ilson, R., ``Recent  Research  in  Text  Processing'',  IEEE
     Trans. Prof. Commun., Vol. PC-23, No. 4, Dec. 4, 1980.

   o+ Finseth, C., ``Theory and Practice of Text Editors - or -  a
     Cookbook  for  an EMACS'', B.S. Thesis, MIT/LCS/TM-165, Mas-
     sachusetts Institute of Technology, May 1980.

   o+ Weinberg, G., ``The Psychology  of  Computer  Programming'',
     New York, Van Nostrand Reinhold, 1971, p. 110.

   o+ Dijkstra, E., ``On  the  GREEN  language  submitted  to  the
     DoD'', Sigplan notices, Vol. 3 No. 10, Oct 1978.

   o+ Rose, Frank, ``Joy of Hacking'', Science 82, Vol. 3  No.  9,
     Nov 82, pp. 58-66.

   o+ ``The Hacker Papers'', Psychology Today, August 1980.

   o+ sdcarl!lin,  ``Real  Programmers'',  UUCP-net,  Thu  Oct  21
     16:55:16 1982

Dictionary

ABEND:

     The IBM term for ABortive END.  It's what you  do  to  bring
     the  system  down when all else fails.  Also, (jokingly) the
     command issued to  the  system  to  enable  the  third-shift
     operators to leave early (from the german Guten Abend, mean-
     ing good evening).

Real Men Don't Eat Quiche:

     It's a wonderful little booklet, describing, with a  lot  of
     humor,  how  a Modern Real Man can live in a world of quiche
     eaters.

Cuisinart:

     State-of-the-art, and rather expensive, brand of  food  pro-
     cessor.

Call-by-value-return:

     This is how FORTRAN compilers  usually  pass  parameters  to
     subroutines.   It's not the same as call by reference (or by
     name), since you are not passing the  addresses  (references
     to)  each  individual  parameter, but rather both the caller
     and the callee know where the parameter block  is  and  deal
     with it appropriately.

Arithmetic-IF statements:
Computed GOTO:
Assigned GOTO:

     `Interesting' FORTRAN constructs:  An  arithmetic  if  is  a
     statement like this: IF (_e_x_p_r_e_s_s_i_o_n) _l_a_b_e_l_1, _l_a_b_e_l_2, _l_a_b_e_l_3.
     _I_f _e_x_p_r_e_s_s_i_o_n _e_v_a_l_u_a_t_e_s _t_o _n_e_g_a_t_i_v_e, _z_e_r_o, _o_r _p_o_s_i_t_i_v_e,  _t_h_e
     _e_x_e_c_u_t_i_o_n  _w_i_l_l  _c_o_n_t_i_n_u_e  _a_t  _l_a_b_e_l_1,  _l_a_b_e_l_2,  _o_r  _l_a_b_e_l_3,
     _r_e_s_p_e_c_t_i_v_e_l_y.  _I_n _R_E_A_L _F_O_R_T_R_A_N,  _o_f  _c_o_u_r_s_e,  _e_x_p_r_e_s_s_i_o_n  _i_s
     _j_u_s_t  _a_n  _i_n_t_e_g_e_r  _v_a_r_i_a_b_l_e!  _A _c_o_m_p_u_t_e_d _G_O_T_O _i_s _l_i_k_e _t_h_e _O_N
     _G_O_T_O _i_n _B_A_S_I_C (_y_u_c_k!): _G_O_T_O (_l_a_b_e_l_1, _l_a_b_e_l_2,..., _l_a_b_e_l_n),  _N
     _w_h_e_n  _N  _i_s _a_n _i_n_d_e_x _i_n_t_o _t_h_e _l_i_s_t _o_f _l_a_b_e_l_s.  _I_f _N<_0 _o_r _N>_n
     _t_h_e _f_o_l_l_o_w_i_n_g _s_t_a_t_e_m_e_n_t _i_s _e_x_e_c_u_t_e_d.  _A_n _a_s_s_i_g_n_e_d _G_O_T_O _i_s  _a
     _b_i_t  _d_i_f_f_e_r_e_n_t.   _Y_o_u _c_a_n _a_s_s_i_g_n _a _l_a_b_e_l _t_o _a_n _i_n_t_e_g_e_r _v_a_r_i_-
     _a_b_l_e _u_s_i_n_g _t_h_e _A_S_S_I_G_N _s_t_a_t_e_m_e_n_t; _y_o_u _c_a_n _s_a_y  _A_S_S_I_G_N  _1_0  _T_O
     _I_F_O_O,  _a_n_d  _t_h_e_n _u_s_e _I_F_O_O _a_s _a _l_a_b_e_l (_e._g., _G_O_T_O _I_F_O_O).  _T_h_e
     _G_O_T_O _I_F_O_O (_l_a_b_e_l_1, _l_a_b_e_l_2,...,_l_a_b_e_l_n) _s_t_a_t_e_m_e_n_t _b_r_a_n_c_h_e_s  _t_o
     _t_h_a_t  _l_a_b_e_l  _m_a_t_c_h_e_d _b_y _I_F_O_O.  _I_f _n_o_n_e _i_s _m_a_t_c_h_e_d, _e_x_e_c_u_t_i_o_n
     _c_o_n_t_i_n_u_e_s.  _I_t'_s _u_s_e_d _w_h_e_n _I_F_O_O  _c_a_n  _h_a_v_e  _b_e_e_n  _s_e_t  _t_o  _a
     _v_a_r_i_e_t_y  _o_f  _l_a_b_e_l_s,  _b_u_t  _y_o_u _o_n_l_y _w_a_n_t _t_o _b_r_a_n_c_h _i_s _i_t _h_a_s
     _b_e_e_n _s_e_t _t_o _s_o_m_e _p_a_r_t_i_c_u_l_a_r _v_a_l_u_e_s.  _Y_o_u _c_a_n _s_a_y _i_t'_s _a  _s_e_t
     _m_e_m_b_e_r_s_h_i_p _o_p_e_r_a_t_i_o_n!  _N_o_w, _h_o_w _m_a_n_y _C_S _s_e_n_i_o_r_s _k_n_o_w _t_h_a_t, _I
     _w_o_n_d_e_r!

_C_P/_M:

     _C_o_n_t_r_o_l _P_r_o_g_r_a_m _f_o_r _M_i_c_r_o_c_o_m_p_u_t_e_r_s.  _A _v_e_r_y  _a_n_t_i_q_u_a_t_e_d  (_c_a
     _1_9_7_8?) _r_u_d_i_m_e_n_t_a_r_y _o_p_e_r_a_t_i_n_g _s_y_s_t_e_m _f_o_r _8_0_8_0-_b_a_s_e_d _m_i_c_r_o_c_o_m_-
     _p_u_t_e_r_s.  _W_o_u_l_d _h_a_v_e _b_e_e_n _p_i_c_k_e_d _u_p _b_y _I_B_M _i_n_s_t_e_a_d _o_f  _M_S_D_O_S,
     (_t_h_e_n _c_a_l_l_e_d _Q_D_O_S) _h_a_d _t_h_e _p_r_e_s_i_d_e_n_t _o_f _D_i_g_i_t_a_l _R_e_s_e_a_r_c_h _n_o_t
     _b_e_e_n _o_u_t _t_o _l_u_n_c_h _w_i_t_h _i_n_s_t_r_u_c_t_i_o_n_s _n_o_t _t_o _b_e _i_n_t_e_r_r_u_p_t_e_d!

_I_J_K_3_0_5_I:

     _I_B_M _m_e_s_s_a_g_e_s  _a_r_e  _u_s_u_a_l_l_y  _t_h_r_e_e  _l_e_t_t_e_r_s  (_i_n_d_i_c_a_t_i_n_g  _t_h_e
     _m_o_d_u_l_e _t_h_e _e_r_r_o_r _o_c_c_u_r_e_d _i_n), _f_o_l_l_o_w_e_d _b_y _a _n_u_m_b_e_r, _f_o_l_l_o_w_e_d
     _b_y _a _l_e_t_t_e_r _i_n_d_i_c_a_t_i_n_g _t_h_e _s_e_v_e_r_i_t_y _o_f _t_h_e _e_r_r_o_r.  _I _i_s  _I_n_-
     _f_o_r_m_a_t_i_o_n.  _I_J_K _i_s _a _f_i_c_t_i_t_i_o_u_s _p_r_e_f_i_x.  _T_h_e _c_l_o_s_e_s_t _t_o _t_h_a_t
     _o_n_e _i_s _I_K_J, _w_h_i_c_h _i_s _t_h_e _M_V_S (_t_h_e_n _O_S) _n_u_c_l_e_u_s, _i_f _m_y _m_e_m_o_r_y
     _s_e_r_v_e_s  _m_e _r_i_g_h_t.  (_I _a_c_t_u_a_l_l_y _t_r_i_e_d _t_o _l_o_o_k _u_p _t_h_i_s _m_e_s_s_a_g_e
     _w_h_e_n _I _w_a_s _w_o_r_k_i_n_g _f_o_r _I_B_M!)

_O_r_a_n_g_e _C_r_u_s_h:

     _F_l_u_o_r_e_s_c_e_n_t-_o_r_a_n_g_e _c_o_l_o_r_e_d _l_i_q_u_i_d, _k_i_n_d _o_f _l_i_k_e _o_r_a_n_g_e  _s_o_d_a
     _w_i_t_h_o_u_t _t_h_e _c_a_r_b_o_n_a_t_i_o_n.  _G_r_o_s_s.

_P_e_a_n_u_t-_b_u_t_t_e_r-_f_i_l_l_e_d-_c_h_e_e_s_e-_b_a_r_s:

     _V_e_n_d_i_n_g-_m_a_c_h_i_n_e _t_y_p_e _o_f _j_u_n_k _f_o_o_d.  _A_l_s_o _a_v_a_i_l_a_b_l_e _a_t _s_u_p_e_r_-
     _m_a_r_k_e_t  _c_h_e_c_k_o_u_t  _c_o_u_n_t_e_r_s.  _T_h_e_s_e _a_r_e _c_h_e_e_s_e-_f_l_a_v_o_r_e_d (_j_u_s_t
     _f_l_a_v_o_r_e_d, _n_o _r_e_a_l _c_h_e_e_s_e) _c_r_a_c_k_e_r_s _f_i_l_l_e_d _w_i_t_h _r_a_n_c_i_d _p_e_a_n_u_t
     _b_u_t_t_e_r _o_r _m_o_c_k-_c_h_e_e_s_e _s_p_r_e_a_d.  _U_s_u_a_l_l_y _t_h_r_e_e _o_n_e-_s_q_u_a_r_e-_i_n_c_h
     _s_a_n_d_w_i_c_h_e_s _t_o _a _p_a_c_k_a_g_e.

_D_o_u_b_l_e-_s_t_u_f_f_e_d _O_r_e_o_s:

     _A _b_r_a_n_d _o_f _c_o_o_k_i_e_s _m_a_d_e _b_y  _N_a_b_i_s_c_o.   _T_h_e_y  _a_r_e  `_s_a_n_d_w_i_c_h'
     _c_o_o_k_i_e_s,  _t_w_o  ~  _2  _i_n_c_h,  _v_e_r_y _d_a_r_k, _s_u_p_p_o_s_e_d_l_y _c_h_o_c_o_l_a_t_e-
     _f_l_a_v_o_r _c_o_o_k_i_e_s, _w_i_t_h _a _v_a_n_i_l_l_a-_f_l_a_v_o_r_e_d _s_t_u_f_f_i_n_g.  _T_h_e_y  _a_r_e
     _v_e_r_y _c_o_m_m_o_n _i_n _t_h_e _U_S.

_T_w_i_n_k_i_e_s:

     _Y_A _e_x_a_m_p_l_e _o_f _j_u_n_k _f_o_o_d.  _T_h_e_s_e _a_r_e _s_m_a_l_l _c_a_k_e_s _f_i_l_l_e_d  _w_i_t_h
     _s_o_m_e _s_o_r_t _o_f _c_u_s_t_a_r_d.  _T_h_e_y _a_r_e _n_o_t _t_o_o _b_a_d (_t_a_s_t_e-_w_i_s_e).

-- 
____ Tim Pierce                / "You are just naive and repressed because
\  / twpierce@unix.amherst.edu /  penis envy is here and it's now and it's
 \/ (BITnet: TWPIERCE@AMHERST) /  all around you." -- Neal C. Wickham
Newsgroups: alt.folklore.computers