Test PScript Command
Purpose
The Test PScript command is used for running the Pascal script code in the currently being edited card as if it was run from a menu item in the list at the bottom of the PScript menu.
To test the script in the currently being edited card
- Ensure that the currently being edited card contains valid PScript code.
- From the PScript menu choose Test.
- If there is no syntax error in the contents of the notes information
area (without taking into consideration the index line), the Pascal script
will run by replacing as appropriate the
CText
,MText
, andSText
variables passed to it by NOTEFILE. - The Before (previous the script is run) and After (after the script has finished) values of these three variables will be displayed in a dialog box. However, nothing else will be modified; even the old contents of these variables in NOTEFILE will not change.
Note: This command will be run while the card containing
the script itself is open; so, for example, the contents of MText
will be the current script. However, any changes on these variables
will not be reflected; so, for example, if MText
is modified
by the script, the new contents of it will not replace the contents of
the card (the script itself).
Keyboard shortcut
F2
Error messages
If there is a compile-time error in the script, an appropriate error message will be displayed and the insertion point will be positioned near the error. The two numbers in the error message indicate the line and column position of the error.
Similarly, if there is a run-time error like Divide by Zero, Out Of Range, etc., an appropriate error message will be displayed, but no indication on where this error occurred will be given.