Trying to learn how to use UDTs correctly, I found this thread: http://www.ionicwind.com/forums/index.php/topic,3214.0.html
Can I define my own types in a similar way as Larry's example to pass multiple variables back to the calling routine?
If you are asking if you can return a UDT from a subroutine, then yes.
TYPE blah
int a
int b
ENDTYPE
def yy as blah
yy = mysub()
...
SUB mysub(), blah
def xx as blah
xx.a = 1
xx.b = 2
return xx
ENDSUB
Paul.
Thanks a lot Paul! ;D ;D
You're welcome. It is one of those cool features that a lot of other compilers don't support without having to allocate memory and pass pointers around.
That was the method I tried whithout success when I noticed that an easier method really did exist. But I couldn't figure out how to do it. As usual I was doing things much to complicated....