# setexitcode

Sets the exit code of MACRO.

    setexitcode <exit code>

## Remarks

### For Windows 98

If MACRO is run from a batch file by the command line "start /w ttpmacro <ttl filename>" (the option /w is necessary), the exit code can be tested by the DOS command "if errorlevel n".

### For Windows NT4.0/2000/XP

If MACRO is run from a batch file by the command line "ttpmacro <ttl filename>", the exit code can be tested by the DOS command "if errorlevel n".

## Example

    ----- Batch file "test.bat" (for Win 98/Me) ------
    rem Run MACRO using the "start /w" command.
    start /w ttpmacro test.ttl
    rem Display message if the exit code is greater than 0.
    if errorlevel 1 echo Error!
    ----- End of "test.bat" ---------

    ----- Batch file "test.bat" (for Win NT/2000/XP) ------
    rem Run MACRO. No need to use the "start" command.
    ttpmacro test.ttl
    rem Display message if the exit code is greater than 0.
    if errorlevel 1 echo Error!
    ----- End of "test.bat" ---------

    ----- Macro file "test.ttl" ----
    ; Set the exit code to 1.
    setexitcode 1
    ----- End of "test.ttl"  ----------