Lua 5.2 Tutorial 8: Advanced functions and Closures

preview_player
Показать описание
In this video we go deeper into the mechanics of functions in Lua.
Рекомендации по теме
Комментарии
Автор

Amazing set of tutorials. Just what I need for my internship!

adnanqz
Автор

Hi,
I have an assignment on Lua and i have been going through your
tutorials on Youtube, How can I make my output of the 'if statement'
to display one part of the statement. My code has multiple if
statements but i want to display one at a time. At the moment the
results are all displayed simultaneously yet I want to run each if
statement end it, then clear screen and then the second automatically
runs again, up to the 10th one,

Your immediate response will be appreciated.

fanniedlamini
Автор

Thank you for the great tutorial!  Although I have a question: In the last example, why does the value of "i" not reset back to 0 each time the function createIter is called with iter()?

andyrobert
Автор

Great tutorial, i have a little tip at 11:30 where you type iter(), rather than typing in it again various times just press: ctr+k+d and it will copy what ever is in the line you just type to the line below and you can do it as many timesas you want

navjotsingh
Автор

"createIter()" return a function reference and "iter" hold that reference. when every-time "iter()" is called the value of "i" is increased. it seems to me that "i" behaves like a "static" variable for that "iter()" function. What happen actually? is "i" remains in the memory util i close my program?

mohammadsadequrrahman
Автор

can anyone explain why we need to set a new variable to the function before we can call it and have it work? i dont really get that part

mickbreiting
Автор

is there any way to change color of text and background of Zerobraine studio?

I customized Notepad++ and it is much better(lower contrast), but it doesnt has output console :-(

zerencz
Автор

Thanks, but it would be better to use this stuff in real world examples

SpectreTheHorseman