Cicode Programming Reference > Using Cicode Programming Standards > Debug Error Trapping > Assert function

Assert function

Assert reports an error if the test passed by the argument does not return the expected value. The implementation of this function can be found in DEBUG.CI in the INCLUDE project.

For example:

INT
FUNCTION
FileDisplayEx(STRING sFileName)

INT hFile;

hFile = FileOpen(sFileName, "r");
ASSERT(hFile <> -1);
...
FileClose(hFile);
RETURN 0;
END

See Also

Debugging Cicode