I've found that a program using a floating-point variable in an extended type will still compile even if the variable is access like an integer :
TYPE TTest
a=5.7
FUNCTION test%:
DEBUG self.a%+"\n"
ENDFUNCTION
ENDTYPE
LOCAL y AS TTest
y.test()
a is defined as a float, but is accessed like its an integer (and the result is a floating-point value).
Do it in a standard function
FUNCTION test%:
LOCAL a=5.7
DEBUG a%+"\n"
ENDFUNCTION
and you get a compiler error (which is correct).
Thanks =D Gernot's not going to be happy :)
Oh, I'm so happy. Soo happy. ... if I wasn't to implement extended types at all :/
I'll have a close look, though.
Well you did say you would regret it, didn't you? :-)
He did too :)
If it's any consolation, I initially disliked them but now I really enjoy them now!
Not an extended types problem. This compiles even with explicit decls. :
FOR i = 1 TO 10; NEXT;
I think variables in FOR/NEXT loops are defined temporarily. This doesn't work:
FOR i = 1 TO 10; NEXT;
PRINT i, 10, 10
Yes, I forgot about that - I'll delete my previous post :whistle:
Silly me...