"Lua"의 두 판 사이의 차이
ph
2번째 줄: | 2번째 줄: | ||
==colon vs. dot== | ==colon vs. dot== | ||
− | A call {{c|v:name(args)}} is syntactic sugar for {{c|v.name(v,args)}, except that {{c|v}} is evaluated only once. | + | A call {{c|v:name(args)}} is syntactic sugar for {{c|v.name(v,args)}}, except that {{c|v}} is evaluated only once. |
[https://www.lua.org/manual/5.3/manual.html#3.4.10 Lua manual : Function Calls]<br> | [https://www.lua.org/manual/5.3/manual.html#3.4.10 Lua manual : Function Calls]<br> | ||
[https://coronalabs.com/blog/2015/12/01/tutorial-understanding-the-colon-vs-dot-operator/ Tutorial: Understanding the colon vs. dot operator] | [https://coronalabs.com/blog/2015/12/01/tutorial-understanding-the-colon-vs-dot-operator/ Tutorial: Understanding the colon vs. dot operator] |
2017년 6월 9일 (금) 10:52 판
lua 5.3 reference manual
colon vs. dot
A call v:name(args) is syntactic sugar for v.name(v,args), except that v is evaluated only once.
Lua manual : Function Calls
Tutorial: Understanding the colon vs. dot operator