Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
MovieClip.new using curly braces instead of parenthesis? — Gideros Forum

MovieClip.new using curly braces instead of parenthesis?

kamcknigkamcknig Member
edited September 2012 in General questions
I noticed in the documents that MovieClip.new uses {} instead of parenthesis. Is this a lua thing? Or a gideros thing? Why is it using curly braces instead of parenthesis?

Comments

  • hnimhnim Member
    Accepted Answer
    that's lua thing. these 2 function calls return same result:
    function test(params)
    	print("params length: ", #params)
    end
     
    test({"a", "b", "c"})
    test{"a", "b", "c"}
    params length: 	3
    params length: 	3
  • @kamcknig as @hnim stated, thats basically a shorthand for passing table as an parameter. ;)
  • Ahh! Thanks so much!
Sign In or Register to comment.