05-12-2009, 10:06 PM
boriel Wrote:Yes, I'm a donkey, that's the reason... It works if I compile first and then start the emulator, not if I start the batch operation (compile and then start the emulator automaticaly).LCD Wrote:If you compile these lines (not using variable b), the compiler should only ignore the fact, variable b is not used, but it stops with this message:Code:dim a as ubyte
dim b as uinteger
a=20
print a
"temp.bas:2: warning: Variable 'b' is never used Errors occured, compilation failed"
It occurs only with optimisation levels 1-3, but not if no optimisation is selected.
This is what I get:
Quote:zxb temp.bas -O2 -T -B -a
temp.bas:2: warning: Variable 'b' is never used
INFO: __PRINTU8 is not defined. No optimization is done.
INFO: PRINT_EOL is not defined. No optimization is done.
I also see something strange in this error message:
Quote:temp.bas:2: warning: Variable 'b' is never used Errors occured, compilation failedthe bold letters are not part of the compiler message! :?:
I also get the warning, but the program gets compiled, and temp.tzx file is created.
Perhaps you're using an external IDE / script to compile? Notice that warnings are also send to stderr output (like error messages), because many programs expect them this way.
I'm using a IDE which does not start the emulator after compilation if something was sent over the stderr channel (because it supposes to be a error which aborts the compilation). Could you please change the output to send such messages to the normal std program output, like the other compiler (optimisations) warnings?
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!