Return a String
BlitzPlus Forums/BlitzPlus Beginners Area/Return a String
| ||
How do you return a string from a fuction? Currently, I can only figure out how to return an integer; when I try to return a string, it just returns 0. I can't even return this: Return "This is a string" Is this a limitation to Blitz? Do I have to just declare a Public variable outside of the function and then modify that? |
| ||
Function getstring$() Return "This is a string" EndFunction Function names are followed by the type they return: % or blank for integers # for floats $ for strings .TypeName for user defined types getint() or getint%() getfloat#() getstring$() getalien.talien() |
| ||
Wow thanks for the quick respose! |
| ||
Thanks too. I didn't know that, because I always return integer variables. |