return type from function

Blitz3D Forums/Blitz3D Beginners Area/return type from function

thanks, i couldn't find anything in the help on this, but i knew it would be in these forums somewhere.

also, here is a full example of how to return a type from a function.

;return a type example

test.testtype=example()

Print "x="+test\x
Print "y="+test\y

WaitKey
End

Type testtype
 Field x,y
End Type

Function example.testtype()

 Local test.testtype
 test.testtype=New testtype
 test\x=42
 test\y=24
 Return test.testtype

End Function