Quote of the Week #22

The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.

– FORTRAN manual for Xerox Computers

2 Responses

  1. You know, the Indiana government tried to get pi changed to 4 a while back… to make it easier on the children; but then they realised that their Fortran programmers hadn’t used the DATA statement, simply typing in 3.141592653589793 at every appearance, because they thought, “Ha! When is PI ever going to change?” Thus, the legislation didn’t pass.

  2. I should correct that… they tried to change it to 3.2.

Comments are closed.