05-11-2009, 10:55 PM
boriel Wrote:LCD Wrote:???boriel Wrote:The 1st problem seems a critical bug, so I'm going to fix it right now! (The function parameter STR(X) bug).
On the other hand, this code works ok:
I use EmuZWin emulator. Which one do you use?Code:dim a as ubyte
a=20
print str(a)
Emulator crashes are not related to the compiler (or should not be).
Note: The POKE STRING ... is a rather strange case. I will check it, anyway.
I was using SPIN 0.666, but after finding it a little "unstable" I should maybe switch to different emulator. It was a crash of the Spectrum code inside emulator. But I had cases where the emulator completly crashes (not from your compiler).
I also found out that the compiler warnings ("x defined as float", or "x not used") causes the compiler to stop the compilation. But I don't give up...
Al this behavior is really odd and is scaring me...hock:
Which codes produces "x defined as float" or "x not used"?
"x not used" should appear if x variable is not used and optimization level (-O) > 1. E.g. -O2
Then x variable is removed. Other than that, it should produce a program.
By the way, a workaround on your subroutine code, place
inside your subroutine before using the variable fixed the problem. It seems I forgot to implicit declared local vars.Code:DIM erg$
EDIT: Fixed. I didn't forgot it. Just an extra tab mislead in a python sub.... and that was the bug!
Scary, I know... If I write
Code:
Dim daytime$ as string
"warning: Variable 'daytime' is never used Errors occured, compilation failed".
the same with other variables:
Code:
Dim a as ubyte
Will check again which code resulted in "x definded as float", maybe the break was caused by something different (I often forgot to write "THEN" after IF and ELSEIF) :oops:
Thanks for fixing the other bug

------------------------------------------------------------
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!