May 06, 2024, 03:42:53 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Debug questions

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

Previous topic - Next topic

0 Members and 1 Guest 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