Strange compiler behavior?

BlitzMax Forums/BlitzMax Programming/Strange compiler behavior?

Pineapple(Posted 2015) [#1]
Why is this code behaving strangely? I'm compiling it on OSX using 1.50.

The code in this box does not work as expected. (It prints "" and then "a test".)



The code in this box works as expected. (It prints "hello world" and then "a test".) The only difference is the addition of a redundant return statement. I have helpfully singled out the relevant line by appending to it "wtf?"




LT(Posted 2015) [#2]
local strarray is declared twice ... the outer return is using the outer, unmodified declaration.


Pineapple(Posted 2015) [#3]
Ha, I feel smart. Thanks for pointing that out.