03-03-2011, 06:32 PM
LTee Wrote:Hi all!
Is it possible to return a string from a function? I tried this:
Code:dim result as STRING
result = test(50)
print result
function test(n as UBYTE) as STRING
return str(n)
end function
But I get a compile error:
Am I doing something wrong? I'm suspecting the answer is 'yes'. :-)Code:test.bas:2: Cannot convert value to string. Use STR() function
Your code looks ok to me.

Can you compile against v1.2.6?