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 swap(a.b) =[need help]=

Author
Message
Icy_Blue
21
Years of Service
User Offline
Joined: 29th Sep 2003
Location:
Posted: 9th Oct 2003 21:55
`============================
a = 10 : b = 50
print a : print b
swap(a, b)
print a : print b
wait key

function swap(y, z)
x = y : y = z : z = x
endfunction

`============================

how i must do if i want function to swap value?
thank ^^' (sorry for my poor english)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Oct 2003 22:46
You can't - Neither DBC or DBPro allow 'pass by reference'. I'm afraid you'll have to do it inline
Icy_Blue
21
Years of Service
User Offline
Joined: 29th Sep 2003
Location:
Posted: 10th Oct 2003 15:58
o.. i see.. Thank you

Login to post a reply

Server time is: 2024-11-25 11:25:19
Your offset time is: 2024-11-25 11:25:19