|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
suwandi_wieming
Rookie
Joined: Mon Sep 17, 2007 5:31 am Posts: 28 Location: Indonesia
|
 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 |
|
 |
starwarslegokid
Moderator
Joined: Wed Jan 31, 2007 3:39 am Posts: 299 Location: San Diego, California. USA
|
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 |
|
 |
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 616
|
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 |
|
|
|
Page 1 of 1
|
[ 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
|
|