planetDistance.frink

View or download planetDistance.frink in plain text format


// Calculates the distances between the earth and other planets.

use planets.frink


//for planet = Planet.planets
planet = Planet.Jupiter
//{
   date = #2010-08-01#

   if (planet.name == "Earth")
      next

   println["# " + planet.name]
   while (date < #2012-12-31#)
   {
      println[(date -> ### yyyy-MM-dd ###) + "\t" + format[trueDistance[date, Planet.Earth, planet], au, 9]]
      date = date + 1 days
   }
//}


View or download planetDistance.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17645 days, 8 hours, 38 minutes ago.