Can functions return strings?

BlitzMax Forums/BlitzMax Beginners Area/Can functions return strings?

Function test:String()
Return "test"
End Function

Print (test)

Doing a build and run and I get the following error
Compile Error: Unable to convert from 'String()' to 'String'

 Function test:String()
Return "test"
End Function

Print (test())

Mfg Suco

Isn't it just the syntax that is wrong in the call to print?

I think it should be -

print test()


edit:
Or how Suco has it above

Thanks for the quick reply. I've been looking at this for 2 days. I'm kicking myself now.

what about assigning the return value to a string... then printing the string... does that work?

--Mike