Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Function Return????

Author
Message
Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 10th Apr 2003 07:36
Can you, and if so how do you, return more than one variable from a Function????

Thank for any help
If it's yellow let it mellow. If it's brown flush it down.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 07:42
anything that has a global element in a function

arrays declared at the top of the main
Typed arrays decalred at the top of the main


will allow u to return more than one parameter and these options dont have to be in the parameter defines for them to work, in fact only a TYPED array can be used as a parameter inside a functions parameters.

It doesnt actually return the value fromt he return area.
the arrays and or typed arrays just get updated in the functio and return there result.

If u want u could always try and break downt he function into seperate calls if u really need to return it in a true sense.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 07:43
will allow u to return more than one parameter and these options dont have to be in the parameter defines for them to work, in fact only a TYPED array can be used as a parameter inside a functions parameters. ( in this regard)

u can use normal strings floats integers etc..

Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 10th Apr 2003 07:49
Could you maybe show me an example?

Thanks

If it's yellow let it mellow. If it's brown flush it down.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 08:24
see attached code snippet.

the typed array and the glob array dont need to have return parameters because they are global inside and out of functions if declared outside int he main

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 08:25
DBP only

but u can access arrays just the same in classic

and u need to use darkedit if using classic to utilise a form of types that get converted to arrays at compile time.

Login to post a reply

Server time is: 2024-09-20 03:36:16
Your offset time is: 2024-09-20 03:36:16