John F. Bergin               

Bellevue, WA

(425) 242-1394

 

John.F.Bergin@Comcast.net                            Resume

 

Word Formatted Resume (Right Click and "Save Target As")

 

Cover Letter                                                    White Papers                                            Code Examples

Senior Software Engineer                                                                                                                                                                                                          

Code Examples by John F. Bergin

 

    Usage Statements

    An important consideration when working on a short term contract is making sure your software can be used by others after your contract ends.

    Even with long term projects, there will most likely come a time when your software will be used by others, and you will no longer be available. 

    In addition to descriptive design documentation and well commented code, Usage Statements increase the usability of your software, and help 

    users with point-of-contact information on how to use the program.

 

   //--------------------------

    //   Print Usage Statement

    //--------------------------

    void Usage(int usage /*0 = Short, 1 = Long*/ )

    {

        // Print Usage

        Console.WriteLine(@"                                                     ");

        Console.WriteLine(@"Usage: TriangleTest.exe Method [Hide] [Help]         "); if (usage == 0) return;

        Console.WriteLine(@"                                                     ");

        Console.WriteLine(@"OPTIONS:                                             ");

        Console.WriteLine(@"     Method   - Drawing Method:                      ");

        Console.WriteLine(@"                       0    - Draw( )                ");

        Console.WriteLine(@"                       1    - DrawIndexed( )         ");

        Console.WriteLine(@"                       2    - DrawInstanced( )       ");

        Console.WriteLine(@"                                                     ");

        Console.WriteLine(@"     Hide        - Hide User Interface.              ");

        Console.WriteLine(@"     Help        - Print help message.               ");

        

          return;

    }

 

 

____________________________

Copyright © 2010 by John F. Bergin.

Home