J
Jesper F
I recently found out about returning several values from a function using a
private type like:
Private Type ABresult
A as string
B as integer
End Type
Function GetInfo() as ABresult
....
GetInfo.A = xx
GetInfo.B = yy
End function
This is very cool. However, if I'm using GetInfo.A and .B somewhere wouldn't
I be calling the GetInfo()-function twice?
If I'm using the values of GetInfo.A and GetInfo.B in the same procedure
somewhere, it seems to eliminate overhead if I have the GetInfo-function
return a string such as "yy;xx" instead and then parse my way to get yy and
xx.
Should the use of private types be reserved for situations where you need
either A og B and not both in conjunction since I'd be running the function
twice and creating overhead?
Thanks for any input.
Jesper Fjølner
private type like:
Private Type ABresult
A as string
B as integer
End Type
Function GetInfo() as ABresult
....
GetInfo.A = xx
GetInfo.B = yy
End function
This is very cool. However, if I'm using GetInfo.A and .B somewhere wouldn't
I be calling the GetInfo()-function twice?
If I'm using the values of GetInfo.A and GetInfo.B in the same procedure
somewhere, it seems to eliminate overhead if I have the GetInfo-function
return a string such as "yy;xx" instead and then parse my way to get yy and
xx.
Should the use of private types be reserved for situations where you need
either A og B and not both in conjunction since I'd be running the function
twice and creating overhead?
Thanks for any input.
Jesper Fjølner