
-----------------------------------
jQwotos
Wed Apr 05, 2017 12:56 pm

Returning multiple values from function
-----------------------------------
What is it you are trying to achieve?
Is there a way to return multiple value from a function?

What is the problem you are having?
Trying to return multiple values from a function
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
For example, in python you can return multiple values from a function, is that possible in turing?

return 1, 2, 3

Please specify what version of Turing you are using
latest

-----------------------------------
Insectoid
Wed Apr 05, 2017 8:22 pm

RE:Returning multiple values from function
-----------------------------------
There's a number of ways you can accomplish this. You could bundle the values into a record, or you could pass variables by reference and edit them inside the function. Passing by reference is very subtle in Turing:

never been in a situation where I wanted to return multiple unrelated variables and I'm not sure why you would! So, basically, you should be using records (or other types that Turing supports).
