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.

DarkBASIC Discussion / RETURN statements

Author
Message
netgamer3k
21
Years of Service
User Offline
Joined: 29th May 2003
Location:
Posted: 29th May 2003 22:29
give me an example on how to use them i seen them in the tutorial that comes with db i think it is for the mousex() var

return value=mousex()

what does that do and can u explain the elements of it.
I AM A NOOB
netgamer3k
21
Years of Service
User Offline
Joined: 29th May 2003
Location:
Posted: 29th May 2003 22:30
return value=mousex() i mean

Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 30th May 2003 00:14
Return can't be used to 'return' a value back to a gosub.. However, if your talking about functions. Then you can return values just by place the variable name after either an ENDFUNCTION or EXITFUNCTION




l8r,
Kevin Picone
[url]www.underwaredesign.com[/url]
EightYearRecoil
22
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United States
Posted: 30th May 2003 04:44
The return value showed in the examples in the book is not actually part of the code. It just shows that the funnction (or command, like Mousex()) is going to return a value. Instead of typing "Return Value" in your program, you would put a variable. SO you could type x = mousex(), and that would store the mouses x position at that point in the variable x.

Login to post a reply

Server time is: 2025-05-18 15:28:31
Your offset time is: 2025-05-18 15:28:31