Testing your script |
Advanced topics | |
If you just want to test your script for errors, but don't want to run it (maybe to prevent it from sending emails etc.), you can use the "compile only flag".
From the command line, adding an exclamation mark at the end of the aptilis file will signify Aptilis to check the program for errors, but not to run it. (You can't have aptilis program file names ending with an '!' now).
Example 1:
sub main(args[]) print( "Hello ) end main save this file as test.e.txt, now type aptilis.exe test.e.txt!Result:
Content-type: text/plain print( "Hello ) ^ At line 3 in sub main Unexpected end of expression, Maybe one or several ')' or ']' or '"' are missing. (code: 26) |
Example 2:
sub main(args[]) print( "Hello" ) end main aptilis.exe test.e.txt!Result:
Example 3:
sub main(args[]) print( "Hello" ) end main aptilis.exe test.e.txt <-- no exclamation mark this timeResult:
Hello |