Argument Error Checking
List of: Discussion Topic
Subjects: Extending ACIS, C++ Interface
Contents: Application Development Manual

Argument checking is conditional in ACIS. The api_checking_on function controls whether the validity of the API arguments is checked before continuing with the API operation. In the file api.hxx, a line of code defines api_checking_on:

#define api_checking_on (api_check_on())

If api_checking_on is TRUE, the checking functions determine if the arguments are valid. API checking is disabled. The function api_checking_on is TRUE when the option is TRUE. The checking functions in this example check only for greater than 0.

Conditionally check arguments:


if (api_checking_on)

{


check_pos_length(width, "width");


check_pos_length(depth, "depth");


check_pos_length(height, "height");
PDF/APPDEV/08EXT.PDF
HTM/DATA/ACIS/APPDEV/08EXT/0022.HTM