PDA

View Full Version : Do Lua functions return by reference or by value?



yaustar
July 4th, 2006, 01:59
Do Lua functions return by reference or by value?

Cheers.

Gizmo356
July 14th, 2006, 13:27
by value and if Im wrong even though I feel confidant of my answere then let me know so i can learn something new

yaustar
July 14th, 2006, 15:03
I decided to check it. It is by reference but only with objects. Base datatype (eg numbers) are passed by value.

Gizmo356
July 14th, 2006, 15:24
ok thanks