Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: MtnClimber
From a Fortran manual:

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.

9 posted on 03/09/2016 6:31:35 PM PST by kosciusko51
[ Post Reply | Private Reply | To 1 | View Replies ]


To: kosciusko51
> This also simplifies modifying the program, should the value of pi change.

LOL!

23 posted on 03/09/2016 7:05:39 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 9 | View Replies ]

To: kosciusko51

“This also simplifies modifying the program, should the value of pi change.”

That just makes it possible to still use the program if you have to run it in Indiana: https://en.wikipedia.org/wiki/Indiana_Pi_Bill

(Sorry - I can never pass up an opportunity to pick at Hoosiers or Cheeseheads)


38 posted on 03/09/2016 9:25:58 PM PST by Stosh
[ Post Reply | Private Reply | To 9 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson