May 27, 2024, 02:27:15 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Debug questions

Started by Rock Ridge Farm (Larry), January 12, 2006, 05:56:30 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Rock Ridge Farm (Larry)

I would like to display the values of variables.
some are int, some are string.
Is there a way to do that?
Can I use printf in a win exe?

Ionic Wind Support Team

You can just use WriteLn and the console.

Or build a debug executable and use this function:

DECLARE IMPORT,OutputDebugStringA(lpOuputString as STRING);

Any thing you send to this function will show up in the debug pane of the IDE....running in debug mode of course.

OutputDebugStringA(STR$(var));

"printf" is part of the standard C library and outputs to the console.
Ionic Wind Support Team

Rock Ridge Farm (Larry)

That worked great - Thanks

Parker

It's a debug question...
How does the compiler know when to define the DEBUG symbol? Is there a command line argument that I don't know about?

Rock Ridge Farm (Larry)

I would think the 'Declare Import' function is turning it on.

Ionic Wind Support Team

Ionic Wind Support Team