View unanswered posts | View active topics It is currently Sat Nov 01, 2014 1:32 am






Reply to topic  [ 3 posts ] 
debug.... 
Author Message
Rookie

Joined: Mon Sep 17, 2007 5:31 am
Posts: 28
Location: Indonesia
Post debug....
debugPrint(format, parm1, parm2)
debugPrintLine(format, parm1, parm2)
ASSERT(assertVar)
VERIFY(assertVar)

what the function using debug???
it can make the program not error????
it can make me easiest to understand if you give me a sample of the program....
thanks very much...


Sun Oct 07, 2007 10:39 pm
Profile YIM
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
I am not familiar with these commands ether, I will see if i can get Dick Swan to help you out.

Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Wed Oct 10, 2007 11:49 pm
Profile WWW
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post 
ASSERT and VERIFY are two macros that can be used to generate user defined exception reports. ASSERT is inactive if you compile using the "Release" version. VERIFY is active for both DEBUG and RELEASE compiles.

Both macros evaluate a boolean condition and generate an exception if it is false. For example, "ASSERT(SensorValue[S1] > 30);". You would typically insert these in your code to test for conditions that you know are true.

ROBOTC has the capability to write to a PC Debugger window -- the "Debug Stream". You use the "debugPrint" function for this. Typically you'd use this to create a chronological record of information about your program execution. For example, you might write a string every time you pass through a loop. "debugPrint" actually writes to a 2K character buffer in the NXT. When the PC based debugger is active, it transfers from this buffer and displays in the "Debug Stream" window.


Fri Oct 12, 2007 5:26 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.