• Advertisement

Archived

This topic is now archived and is closed to further replies.

Getting 2 result from a function

This topic is 6500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I got this function where i calculate some stuff........ public function(x as integer, y as integer) as integer calculate stuff..... result1 = blahblah result2 = blahblah "its actually coordinates i calculate" end function now i wanna use thoose 2 results somewhere else how do i call the results like thisthingy.height = result1 thisthingy.width = result2 could anyone give an example in visual basic syntax since thats what im using 4 this project thanx

Share this post


Link to post
Share on other sites
Advertisement
If you pass the x and y arguments as ByRef then they will have the new values after the function exits.

//Rickard

Share this post


Link to post
Share on other sites
Or you can pass types or objects.

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Share this post


Link to post
Share on other sites

  • Advertisement