- Freebasic .90.1
I'm using a batch file under a command window in Win7 to compile and run my test programs while I learn FB. But when FBC.EXE gets a compiler error, it does not set the DOS errorlevel. Here's my batch file go.bat:
Code: Select all
@echo off
\compilers\freebasic\fbc test1.bas
if errorlevel 1 then goto myexit
test1
echo "Errorlevel is "
echo %ERRORLEVEL%
:myexit
echo on
I got it. Here's what I ended up with.
Code: Select all
@echo off
if exist del test1.exe
\compilers\freebasic090\fbc test1.bas
if errorlevel 1 goto myexit
if exist test1.exe test1
echo Errorlevel is %ERRORLEVEL%
:myexit
echo on