planetDistance.frink

Download or view 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
   }
//}


Download or view 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 20145 days, 6 hours, 27 minutes ago.