genya10g
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 1227 |
|
|
| 30 Aug 2013 07:25 PM |
| If I have a function that calls another, for instance it calls picknumber(), then inside of picknumber I put "return number", how do I access that returned number? |
|
|
| Report Abuse |
|
|
josh50000
|
  |
| Joined: 29 Nov 2009 |
| Total Posts: 697 |
|
|
| 30 Aug 2013 07:34 PM |
function picknumber() return 50000 end
function otherfunction() local number = picknumber() -- this variable will equal 50000 end
I'm guessing this is what you mean. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 30 Aug 2013 07:35 PM |
| If you want a wikipedia-fied version of return statements, see here: http://en.wikipedia.org/wiki/Return_statement |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 30 Aug 2013 07:35 PM |
| What do you mean exactly? Like a function in a function with a return? |
|
|
| Report Abuse |
|
|
genya10g
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 1227 |
|
| |
|