Week 2.2 (no Week 2.1) September 14, 2011
Read: Chapter 3 and 4 of the textbook.
Prerequisite for success in Computer Programming:
Donald Knuth (perhaps the world's foremost Computer Scientist) put it
best in a keynote address for the 11th World Computer Congress in
"What were the lessons I learned from so many years of intensive
work on the practical problem of setting type by computer? One of
the most important lessons, perhaps, is the fact that SOFTWARE IS
HARD. From now on I shall have significantly greater respect for
every successful software tool that I encounter. During the past
decade I was surprised to learn that the writing of programs for TeX
and METAFONT proved to be much more difficult than all other
things I had done (like proving theorems or writing books). The
creation of good software demands a significantly higher standard of
accuracy than those other things do, and it requires a longer attention
span than other intellectual tasks."
Fortran Program Components
main program, subprograms (functions, subroutines)
provide names and attributes of variables
set aside space
- manipulate values of variables (do work):
assignment statements, input, etc.
- determine order in which statements are executed:
the game of "musical buckets"
- make program easier to understand for humans
- have NO effect on program or computer
! read Fahrenheit temperature and
! print corresponding Celsius value
c = 5 * (f - 32) / 9
CSE 1540 Week 2.2 – September 14, 2011 page 1 of 4