Assert

The assert() function takes two arguments: type and args (a variable argument list). The sole purpose of this function is to throw an exception error if args is not of dataType type, or if args is not ofKind() type, or if args does not implement Interface type.

 

       assert(myInterface, myObject);

       assert(TypeInt, myVal1, myVal2, myVal3);

 

The args variable argument list means that more than one variable can be checked for the given condition. If any of the arguments fail the test the assert function throws an exception.

 

Runtime error: [Assertion failed: datatype myIF2 required for argument, but argument has datatype myObject with value "myObject".]

 

 

This file is part of the TADS 3 Proteus Library Extension

Copyright © 2001-2004 Kevin Forchione. All rights reserved.