StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
promptTest.cc
1 /***************************************************************************
2  *
3  * $Id: promptTest.cc,v 1.3 2000/02/02 19:05:18 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, April 1998
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: promptTest.cc,v $
13  * Revision 1.3 2000/02/02 19:05:18 ullrich
14  * Changed macros for CC5/CC4.2 compatibility
15  *
16  * Revision 1.2 1999/12/21 15:14:56 ullrich
17  * Modified to cope with new compiler version on Sun (CC5.0).
18  *
19  * Revision 1.1 1999/02/17 12:44:01 ullrich
20  * New Revision
21  *
22  * Revision 1.1 1999/01/23 00:26:49 ullrich
23  * Initial Revision
24  *
25  **************************************************************************/
26 #include "StPrompt.hh"
27 #include "StThreeVector.hh"
28 #include <string>
29 #if !defined(ST_NO_NAMESPACES)
30 using std::string;
31 #endif
32 
33 int main()
34 {
35  StThreeVector<float> vec2(1,2,3);
36  StPrompt("Enter new 3-vector", vec2);
37  cout << "new value: " << vec2 << endl;
38 
39  string filename("var.cc");
40  char othername[16] = "short.c";
41  double var = 1/3.;
42 
43  bool answer = true;
44  while (answer) {
45  StPrompt("Enter file name", filename);
46  cout << "new value: " << filename.c_str() << endl;
47  StPrompt("Enter other name", othername, 16);
48  cout << "new value: " << othername << endl;
49 
50  StPrompt("any number", var);
51  cout << "new value: " << var << endl;
52 
53 #if defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500
54  StBoolPrompt("more questions", answer);
55 #else
56  StPrompt("more questions", answer);
57 #endif
58  }
59 
60  StPrompt();
61  cout << "bye" << endl;
62  return 0;
63 }