// Save Text File Demo
//
// This macro demonstrate how to use the File.open() and
// print() functions to save a sine/cosine table in a text file.

   f = File.open(""); // display file open dialog
   //f = File.open("/Users/wayne/table.txt");
   for (i=0; i<=2*PI; i+=0.01)
      print(f, i + "  \t" + sin(i) + " \t" + cos(i));

   // use the d2s() function (double to string) to specify 
   // the number of  decimal places, in this example nine.
   for (i=0; i<=2*PI; i+=0.01)
      print(f, d2s(i,9) + "  \t" + d2s(sin(i),9) + " \t" + d2s(cos(i),9));
