function my_func(...) as my_type
dim x as my_type
...
return x
end function
Also vic, I posted this in the sourceforge tracker 'feature request' part but I figured you'd never check it. Why is there no link from freebasic.net to the project page (sourceforge.net/projects/fbc) ? Dont want people using sf.net?
Yeah, it's in the TODO's, but as explained before, FB follows GCC 3.x to be able to use C libs that return types, and they can be returned in many ways, depending on the fields or the size of the UDT's (they can be returned in AL, AX, EAX, EAX:EDX, ST(0) or as a pointer to the hidden parameter passed by the caller), so many changes will be needed internally to support that..
I'm redesigning the site again, sf.net page is listed in the forums page.
There's no way to know when a prototype is a C or FB function, so if a FB function is going to return an user type, it must be done following the GCC 3.x ABI.