// g01et Example Program Text // C# version, NAG Copyright 2008 using System; using NagLibrary; using System.Globalization; using System.IO; namespace NagDotNetExamples { public class G01ETE { static string datafile = "ExampleData/g01ete.d"; static void Main(String[] args) { if (args.Length == 1) { datafile = args[0]; } StartExample(); } public static void StartExample() { try { DataReader sr = new DataReader(datafile); double x, y; bool carryon = true; Console.WriteLine("g01et Example Program Results"); // Skip heading in data file sr.Reset(); Console.WriteLine(""); Console.WriteLine(" {0}", " x y"); Console.WriteLine(""); while (carryon) { try { sr.Reset(); x = double.Parse(sr.Next(), CultureInfo.InvariantCulture); } catch { break; } // // Compute the value of the Landau distribution function // y = G01.g01et(x); // Console.WriteLine(" {0,4:f1} {1,12:e4}", x, y); continue; // } // } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine( "Exception Raised"); } } } }