You are on page 1of 1

Built-In Functions

ASSERT()
Syntax:

assert (condition);

Parameters:

condition is any relational expression

Returns:

Nothing

Function:

This function tests the condition and if FALSE will generate


an error message on STDERR (by default the first USE
RS232 in the program). The error message will include the
file and line of the assert(). No code is generated for the
assert() if you #define NODEBUG. In this way you may
include asserts in your code for testing and quickly eliminate
them from the final program..

Availability:

All devices

Requires

assert.h and #use rs232

Examples:

assert( number_of_entries<TABLE_SIZE );
// If number_of_entries is >= TABLE_SIZE then
// the following is output at the RS232:
// Assertion failed, file myfile.c, line 56

Example Files:

None

Also See:

#use rs232

ATOF()
Syntax:

result = atof (string)

Parameters:

string is a pointer to a null terminated string of characters.

Returns:

Result is a 32 bit floating point number.

89

You might also like