The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STR problem (*solved*)
#9
boriel Wrote:
LCD Wrote:
Code:
dim a as ubyte dim b as uinteger a=20 print a
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:
"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 failed
the 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.
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).
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!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)