03-04-2011, 09:13 AM
Oops!
I just gave it a go with 1.2.6 r1812 (the final release of 1.2.6?) and it throws the same compilation error.
Here's the interesting thing - the call to the function only fails to compile if it's within the same file as the function declaration. So if I make two files, like this:
ReturnString.bas:
TestReturnString.bas:
... and then compile TestReturnString.bas, then everything is fine. I guess this explains why some of the library files compile okay, they have String functions in them but never call themselves. :-)
I just gave it a go with 1.2.6 r1812 (the final release of 1.2.6?) and it throws the same compilation error.
Here's the interesting thing - the call to the function only fails to compile if it's within the same file as the function declaration. So if I make two files, like this:
ReturnString.bas:
Code:
function test(n as UBYTE) as STRING
return str(n)
end function
TestReturnString.bas:
Code:
#include "ReturnString.bas"
dim result as STRING
result = test(50)
print result
... and then compile TestReturnString.bas, then everything is fine. I guess this explains why some of the library files compile okay, they have String functions in them but never call themselves. :-)