Strange bug/behaviour

Archives Forums/BlitzMax Bug Reports/Strange bug/behaviour

degac(Posted 2009) [#1]
SuperStrict
Local fileID:TStream,tt:String
fileID=WriteFile("data/"+tt."_dati.txt")' <--- my typo error (. should be +)
If fileID<>Null Print "Opened..."

I don't know if this is really be considered a bug or a feature...
But it seems compiler dont' consider the thing (tested in debug and release mode).

Here I have a TT declared as a STRING, but in my original source TT was a user-type. Same behaviour.

Strange.


SebHoll(Posted 2009) [#2]
Interestingly, this shorter example compiles and runs too:

SuperStrict
Local myObject:Object
Print "a" + myObject . "c"



Floyd(Posted 2009) [#3]
Well, it's kind of a 'feature'...



SebHoll(Posted 2009) [#4]
Wouldn't that kinda imply that the following should work then (based on Mark's explanation)?

Const HELLO:Int = 5
Print "Hello".HELLO 'Should print 5 according to Mark



N(Posted 2009) [#5]
Well this is neat and bizarre...


degac(Posted 2009) [#6]

Well, it's kind of a 'feature'...


...I didnt' remember there are already a thread about this...(and I posted on it too!)

I think the compiler should check this 'syntax error'. I spent 20 minutes to check why my program didn't write the file, just only to discover the 'typo-error'...

Ok, just to take note of the thing.