9951 explained code solutions for 126 technologies


luaHow to create function


function say_hi(to)
   return 'Hi ' .. to.. '!';
endctrl + c
function say_hi

declare new function named say_hi

(to)

argument(s)

return 'Hi ' .. to.. '!';

implementation (returns greeting string in our case)

end

ends function block