// s21bj Example Program Text // C# version, NAG Copyright 2008 using System; using NagLibrary; using System.Globalization; namespace NagDotNetExamples { public class S21BJE { static void Main(String[] args) { StartExample(); } public static void StartExample() { try { PrintManager.Warning = new PrintManager.MessageLogger(discardmessage); double dm, f; int ix; int ifail; Console.WriteLine("s21bj Example Program Results"); Console.WriteLine(""); Console.WriteLine(" {0}", " dm s21bj ifail"); Console.WriteLine(""); // for (ix = 1; ix <= 3; ix++) { dm = ix * 0.250e0; // f = S.s21bj(dm, out ifail); // if (ifail >= 0) { Console.WriteLine(" {0,7:f2}{1,12:f4}{2,5}", dm, f, ifail); } else { Console.WriteLine("** s21bj failed with ifail = {0,5}", ifail); } } } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("Exception Raised"); } } static void discardmessage(String message) { } } }