Wiki Page Content

Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2011-04-18 18:26:47
Size: 756
Editor: SheenaSmith
Comment: update content (in progress)
Revision 4 as of 2013-07-29 05:20:08
Size: 762
Editor: RyanGordon
Comment: SDL_assert updates
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to ^create an assertion for debugging^. Use this macro to create an assertion for debugging.
Line 20: Line 19:
You can add your code example here SDL_assert(1 == 0); // triggers an assertion.
SDL_assert(1 == 1); // does NOT trigger an assertion.
Line 24: Line 24:
This function is enabled only when the SDL_ASSERT_LEVEL is set to 2 or 3, otherwise it is disabled. See the [[CategoryAssertions|Assertions]] Category page for details. This function is enabled only when the SDL_ASSERT_LEVEL is set to 2 or 3, otherwise it is disabled. See the [[CategoryAssertions|Assertions Category page]] for details.

SDL_assert

Use this macro to create an assertion for debugging.

Syntax

void SDL_assert(condition)

Function Parameters

condition

the expression to check

Code Examples

SDL_assert(1 == 0);  // triggers an assertion.
SDL_assert(1 == 1);  // does NOT trigger an assertion.

Remarks

This function is enabled only when the SDL_ASSERT_LEVEL is set to 2 or 3, otherwise it is disabled. See the Assertions Category page for details.


CategoryAPI, CategoryAssertions

None: SDL_assert (last edited 2013-07-29 05:20:08 by RyanGordon)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit