Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STR problem (*solved*)
#5
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:
Code:
dim a as ubyte
a=20
print str(a)
I use EmuZWin emulator. Which one do you use?
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... Confusedhock:
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
Code:
DIM erg$
inside your subroutine before using the variable fixed the problem. It seems I forgot to implicit declared local vars.

EDIT: Fixed. I didn't forgot it. Just an extra tab mislead in a python sub.... and that was the bug! Wink

Scary, I know... If I write
Code:
Dim daytime$ as string
and don't use it (or simply rem out the lines where it was used), the compiler throws out:
"warning: Variable 'daytime' is never used Errors occured, compilation failed".
the same with other variables:
Code:
Dim a as ubyte
results in "warning: Variable 'a' is never used Errors occured, compilation failed" if I do not use the variable.
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 Smile.
------------------------------------------------------------
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: 2 Guest(s)