-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFor.cpp
58 lines (44 loc) · 995 Bytes
/
For.cpp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* \file For.cpp
* \brief
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
#include <Stl.h>
//---------------------------------------------------------------------------
bool
trace(const std::string &a_point)
{
std::cout << a_point;
return true;
}
//---------------------------------------------------------------------------
int main(int, char **)
{
{
int i = 0;
for (trace("1,"); trace("2"); trace("3,")) {
std::cout << " {" << STD_TRACE_VAR(i) << "}" << std::endl;
++ i;
if (i == 5) {
break;
}
}
}
{
std::cout << std::endl;
for (int x = 0; x != 0; ++ x) {
std::cout << " {" << STD_TRACE_VAR(x) << "}" << std::endl;
}
}
return EXIT_SUCCESS;
}
//---------------------------------------------------------------------------
#if OUTPUT
1,2 {i: 0}
3,2 {i: 1}
3,2 {i: 2}
3,2 {i: 3}
3,2 {i: 4}
// x - n/a
#endif