Assert()
Summary
Causes a macro error with the specified string if the test expression is false (0).
Syntax
rslt = Assert(int testtexpr, string msg)
| Argument | Contents |
|---|---|
| testsexpr | An integer, or an expression to be evaluated |
Notes
The Assert() statement generates a macro error of the "error" type, so it can be caught with an "on error" handler.
The Assert() statement does not distinguish between debugging or release mode, like some language assertions do.
See Also
| Function | Summary |
|---|---|
| GetLastError() | Gets the text of the last error generated by Maptitude |
| SetReferenceInfo() | Toggles showing the reference information when calling GetLastError() |
| Throw() | Causes an error to be raised |