Home > Running a Script > Compilation

Compilation

The compilation process transforms the plain-text .SRC script file into a compiled .ROB file, which is ready for execution if no compilation errors are detected. A SRC file cannot be executed as is, it has first to be compiled and the compilation checks if syntax errors are there.

If you want to compile a script (SRC file) and immediately run it if no syntax errrors are found, just click  icon. You can too select Start/Run menu option or press Control+T. The compilation results are displayed in the Output window below the SRC text. If no errors are detected, a message "Compilation ended successfully" is displayed in the status bar of WinTask x64 Editor. If errors are detected, they are listed in the Output window, you can double click the line reporting the error, and the text cursor will jump automatically in the SRC window at the line in error, so you can correct it easily.

If you want only to compile a script (SRC file) without executing it, select Start/Compile only menu option, or press Control+F7. The Compilation dialog box is then displayed, the dialog box gives the name of the source file, the number of warnings and errors. If errors are found, click View to display the .LST file - the results of the compilation process. If no errors are found, click Run to execute the script. If errors are detected, they are listed in a new window whose title is the name of the source file with the .LST extension (for listing). You can double click the line reporting the error, and the text cursor will jump automatically in the SRC window at the line in error, so you can correct it easily

For advanced programmers using WinTask x64 Include function:
You can include at compilation several SRC files in order to get a big SRC file created at compilation. If you use multiple Include lines, you have to ensure that the full long script with those inclusions keep the correct program structure, first the Dim lines, second the Functions and Subs definitions and last the main program. Yo need too to ensure that all the Subs/Functions are declared before using them in another Function/Sub. You have to ensure that there are no duplicate names. And for maintenance ease, we recommend that you use different parameters names within the different Functions/Subs.


See also

 Compiler limits 
 Compilation in Batch Mode