Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Returning a String from a function
#1
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:
Code:
test.bas:2: Cannot convert value to string. Use STR() function
Am I doing something wrong? I'm suspecting the answer is 'yes'. :-)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)