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