// s10aa Example Program Text // C# version, NAG Copyright 2008 using System; using NagLibrary; using System.Globalization; namespace NagDotNetExamples { public class S10AAE { static string datafile = "ExampleData/s10aae.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; Console.WriteLine("s10aa Example Program Results"); // Skip heading in data file sr.Reset(); Console.WriteLine(""); Console.WriteLine(" {0}", " x y"); Console.WriteLine(""); try { while ( true ) { sr.Reset(); x = double.Parse(sr.Next(), CultureInfo.InvariantCulture); y = S.s10aa(x); // Console.WriteLine(" {0,12:e3}{1,12:e3}", x, y); } } catch { } } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("Exception Raised"); } } } }