Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Issue seeing results of DUMP in built in tutorials
Issue seeing results of DUMP in built in tutorials [message #44853] Wed, 08 July 2015 17:59 Go to next message
frank.taylor is currently offline  frank.taylor
Messages: 1
Registered: July 2015
Junior Member
Hello, sorry if this is posted somewhere. I searched and didn't see anything.

I was going through the tutorials and noticed that the DUMP() macros weren't displaying output anywhere I could find. I managed to get it to work by adding StdLogSetup(LOG_COUT); as the first step in the program and getch() (from conio.h) as the last step. For instance this is the modified code for the Core03 tutorial:

#include <Core/Core.h>
#include <conio.h>  // Added this

using namespace Upp;

CONSOLE_APP_MAIN
{
	StdLogSetup(LOG_COUT);  // Added this
	SetDefaultCharset(CHARSET_UTF8);

	WString x = "characters 280-300: ";
	for(int i = 280; i < 300; i++)
		x.Cat(i);
	DUMP(x);

	String y = x.ToString();
	DUMP(y);
	y.Cat(" (appended)");
	x = y.ToWString();

	DUMP(x);
	getch();  // Added this
}


Anyway, not sure if I overlooked something but hopefully this helps if anyone else has the same problem.

Thanks!
Re: Issue seeing results of DUMP in built in tutorials [message #44856 is a reply to message #44853] Thu, 09 July 2015 11:06 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
This is fine; often I place

StdLogSetup(LOG_COUT|LOG_FILE);

which redirects log to both console and log file.

Anyway, the default settings is to put debugging output to the log file (only). Its standard location is .exe dir in Win32 and ~/.upp/appname dir in POSIX.

You can access this file easily through menu entry Debug/View log file Alt+L.

Mirek
Previous Topic: How does one set the output for library files?
Next Topic: GeoFun compilation problem with MSVC12
Goto Forum:
  


Current Time: Sat Apr 20 16:07:54 CEST 2024

Total time taken to generate the page: 0.02982 seconds