1 #include <Core/Core.h> 2 3 using namespace Upp; 4 5 struct Foo { 6 int i; 7 ToStringFoo8 String ToString() const { return "Foo: " + AsString(i); } 9 FooFoo10 Foo() { i = 0; } FooFoo11 Foo(int i) : i(i) {} 12 }; 13 14 CONSOLE_APP_MAIN 15 { 16 LOG(123); 17 LOG("Loop:"); 18 LOGBEGIN(); 19 for(int i = 0; i < 4; i++) 20 DUMP(i); 21 LOGEND(); 22 DUMP(Foo(1)); 23 24 Vector<String> x; 25 x.Add("One"); 26 x.Add("Two"); 27 x.Add("Three"); 28 DUMPC(x); 29 30 VectorMap<String, String> y; 31 y.Add("Key1", "Value1"); 32 y.Add("Key2", "Value2"); 33 DUMPC(y); 34 35 static char h[200] = "alsjkdfhlaksjdhfklajshdfklj"; 36 LOGHEXDUMP(h, 200); 37 38 String s = "Some text for hex dumps"; 39 LOGHEX(s); 40 DUMPHEX(s); 41 42 RLOG("Prepending 'R' forces log even in the release mode"); 43 44 // You need to comment out following line in order to compile in release mode 45 DLOG("Prepending 'D' issues error when compiled in release mode. This is to avoid forgotten debug logs"); 46 } 47