File: mbl_read_int.h

package info (click to toggle)
vxl 1.17.0.dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 153,280 kB
  • ctags: 105,123
  • sloc: cpp: 747,420; ansic: 209,130; fortran: 34,230; lisp: 14,915; sh: 6,187; python: 5,856; makefile: 340; perl: 294; xml: 160
file content (36 lines) | stat: -rw-r--r-- 1,319 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This is mul/mbl/mbl_read_int.h
#ifndef mbl_read_int_h_
#define mbl_read_int_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
// \file
// \brief Asks question and waits for an answer
// \author tim, updated by me apparently!!!
//  updated to vxl caringly in the way one can only do on a Friday afternoon by gvw
//
// - Function Name: mbl_read_int
// - Synopsis:      int mbl_read_int(char* q_str, int default_int)
// - Inputs:        q_str: A question 
//                  default_int: Default answer
//                  min_int: Min allowed value (optional)
//                  max_int: Max allowed value (optional)
// - Outputs:       -
// - Returns:       The answer or a default
// - Description:   Asks question and waits for an answer.
//                  If the answer is an integer, returns it.
//                  If the answer is an empty vcl_string (return)
//                  then returns default.
//                  Otherwise waits for another input.
// - References:    -
// - Example:
// \code
//    int new_scale = mbl_read_int("Scale?",5);
//    int new_scale = mbl_read_int("Scale?",5,min_scale,max_scale);
// \endcode

int mbl_read_int(const char* q_str, int default_int);
int mbl_read_int(const char* q_str, int default_int, int min_int, int max_int);

#endif //mbl_read_int_h_