declaring a function that returns a custom type 
Author Message
 declaring a function that returns a custom type

Does anyone know how to create a function that returns a custom type in
powerbasic 3.0?  I have tried something like this:

Function test() as myType

But this doesn't work.  It seems that functions are listed to numeric
types (%,#,!,&) or $ type.  Does anyone know of a way to do this?  Any
help would be appreciated.  I heard that PB 3.1 now lets you copy whole
structures like:
dim a as myStruct, b as myStruct
...
a=b
Does this capability allow PB 3.1 to do what I wanted to do (above)?  The
closest solution I could come up with would to pass a structure as a
string.  But then the function would have to break the string down into
parts which isn't the idea solution.
Can anybody help?

Michael



Mon, 01 Sep 1997 06:55:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to declare function to return multidimensional array

2. Declaring a Public Function that returns a Dynamic String Array

3. Help declaring functions returning structs?

4. Custom Collection returning a specific type.

5. Cannot assign a variable declared as a string to a variable declared as data type

6. Eval function using a custom typed variable

7. QB45 function returning type?

8. Return NULL from a user-defined type function

9. Use user defined type in place of array for function returns

10. Can a function return a userdefined type?

11. Returning user defined types from functions

12. Returning a User Defined Type from a Class Function

 

 
Powered by phpBB® Forum Software