Lua基础(对象)
2019獨角獸企業重金招聘Python工程師標準>>>
:和 . 區別
.
???stu={id=100,name="Tom",age=21}--成員變量function?stu.toString()--成員函數return?stu.id?..?stu.name?..?stu.ageendprint(stu.toString()) print(stu:toString()):
???stu={id=100,name="Tom",age=21}function?stu:toString()return?self.id?..?self.name?..?self.ageend print(stu:toString())轉載于:https://my.oschina.net/kkkkkkkkkkkkk/blog/390144
總結
- 上一篇: “羲和号”卫星顺利通过在轨试验总结评审,
- 下一篇: CodeForces 14E Camel