SET_MP_TYPE_CHECKING ​
SET_MP_TYPE_CHECKING turns the type checking of commands in AdoScript MessagePorts on or off.
Syntax ​
leo-grammar
CC "AdoScript" SET_MP_TYPE_CHECKING ( on | off ) .
Parameters ​
on
(modifier) - activates type checkingoff
(modifier) - deactivates type checking
Returns ​
none
Details ​
By default (at startup of the application), type checking is turned off (for reasons of compatibility). Though it is strongly recommended always to switch the type checking on once directly after the initialization of the application, because otherwise parameter errors in AdoScript are hard to find.
See Also ​
Examples ​
Example 1 ​
asc
CC "AdoScript" INFOBOX "Provoke an aleo-36 error by calling INFOBOX without passing an argument"
CC "AdoScript" SET_MP_TYPE_CHECKING on
CC "AdoScript" INFOBOX
CC "AdoScript" INFOBOX "Do it again, this time without type checking"
CC "AdoScript" SET_MP_TYPE_CHECKING off
CC "AdoScript" INFOBOX
CC "AdoScript" INFOBOX "Done."
The third command in the example provokes the following error message. The sixth command is also invalid but as type checking is turned off, no error message will be displayed.
Example 2 ​
asc
ON_EVENT "AppInitialized"
{
CC "AdoScript" SET_MP_TYPE_CHECKING on
}
Insert SET_MP_TYPE_CHECKING into the "AppInitialized" event handler, defined in the External Coupling library attribute.
Versions and Changes ​
Available since ADOxx 1.3