Compilation in Batch Mode

Compiling is usually done through the Start/Run menu or by clicking  icon; a Compilation dialog is displayed and the .SRC file is compiled into a .ROB file.

Compiling in batch mode allows you to compile several .SRC files without displaying the dialog box.

Use the following command line:

<switch> can be:
b: If no errors are detected during compilation, the compiled <myscript>.rob is created; if an error is detected, the usual compilation dialog box is displayed.
x: If no errors are detected during compilation, the compiled <myscript>.rob is created and the script is launched; if an error is detected, the usual compilation dialog box is displayed.
v: If no errors are detected during compilation, the compiled <myscript>.rob is created; if an error is detected, the usual compilation dialog box is displayed and the list of errors is displayed (.LST file).

 0 No error, no warning 1 At least one error 2 No error, but at least one warning

Batch examples

BAT for compiling a couple of .src files in the same batch file:
"%COMPILER%" /b "script_One.src"
"%COMPILER%" /b "script_Two.src"
"%COMPILER%" /b "script_Three.src"

Another example with no echo:
@echo off
if errorlevel 2 goto warning
if errorlevel 1 goto error
if errorlevel 0 goto ok

:warning
echo Warning(s) !
goto end

:error
echo ERROR(S) !
pause
goto end

:ok
echo OK
goto end

:end

.BAT for compiling all the .src files in the Scripts directory :
Note : the FOR statement converts names longer than 8 characters to short names using the ~ character.