Assertions in C89? -


itemprop = "text">

I am writing C89 on MS89 Visual Studio 2010 Beta, similar to the keyword emphasis of Java, How can I make an argument? I think I need to define a macro, but I'm not sure how. (It seems that something that was done before, so I want to use it instead of trying to roll myself.)

Here's an estimate:

  int (int true_value) {// program crash with a suitable error message}  

C89 & lt; Assert.h & gt; , which includes the macro

Include # lt; Assert.h & gt; (Expression) claims;

From the document:

emphasis () The macro test given expression and if it Incorrect, the calling process has ended. A diagnostic message is written on stderr and the abort (3) function is said to terminate the program effectively.

If expression is correct, then emphasize () macro does nothing.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -