Using assert();

Post Reply
Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Using assert();

Post by Sylus101 » Thu Apr 23, 2009 6:56 pm

Hello everyone,

I'm new to the use of assert(). I have included <assert.h> and understand how the condition works, but what is supposed to happen when an assertion fails? At this point, I just get a blank screen...
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

weirdfox
Posts: 29
Joined: Thu Feb 19, 2009 8:45 am
Location: Montreal, Canada
Contact:

Re: Using assert();

Post by weirdfox » Fri Apr 24, 2009 12:16 am

use "sassert" from nds/arm9/sassert.h

Code: Select all

sassert(condition, "error message");
This version will stop the software and print the message on the screen with the condition that failed.
try, crash, debug and learn :)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests