contrib/mul/mbl/mbl_read_double.h
Go to the documentation of this file.
00001 // This is mul/mbl/mbl_read_double.h
00002 #ifndef mbl_read_double_h_
00003 #define mbl_read_double_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Asks question and waits for an answer
00010 // \author tim
00011 // hand crafted into vxl by gvw
00012 // 
00013 // - Function Name:  mbl_read_double
00014 // - Synopsis: double mbl_read_double(char* q_str, double default_d)
00015 // - Inputs:   q_str: A question 
00016 //      default_d: Default answer
00017 //        min_d: Min allowed value (optional)
00018 //        max_d: Max allowed reply (optional)
00019 // - Outputs:  -
00020 // - Returns:    The answer or a default
00021 // - Description:  Asks question and waits for an answer.
00022 //      If the answer is a double, returns it.
00023 //      If the answer is an empty vcl_string (return)
00024 //      then returns default.
00025 //      Otherwise waits for another input.
00026 // - References: -
00027 // - Example: 
00028 // \code
00029 //    new_scale = mbl_read_double("Scale?",1.00);
00030 //    double new_scale = mbl_read_double("Scale?",1.00,min_scale,max_scale);
00031 // \endcode
00032 
00033 double mbl_read_double(const char* q_str, double default_d);
00034 double mbl_read_double(const char* q_str, double default_d, double min_d, double max_d);
00035 
00036 #endif //mbl_read_double_h_