官术网_书友最值得收藏!

What's with the dots?

When you look at code written by others, you'll see words with periods separating them. What the heck is that? It looks complicated, doesn't it? The following is an example from the Unity documentation:

transform.position.x 

Don't concern yourself with what the preceding code means, as that comes later. I just want you to see the dots.

This is called dot syntax. The following is another example. It's the fictitious address of my house: UnitedKingdom, Bedfordshire, Sandy, 10MyStreet. Looks funny, doesn't it? That's because I used the syntax (grammar) of C# instead of the post office. However, I'll bet that if you look closely, you can easily figure out how to find my house. We'll get into much more at a later stage. For now, think of dot syntax as an address, starting from a big thing, a country in this case, and narrowing down to the most precise part that we want to access.

主站蜘蛛池模板: 和硕县| 通州市| 郴州市| 琼结县| 汤阴县| 临安市| 正宁县| 长葛市| 怀柔区| 竹溪县| 怀安县| 两当县| 铁力市| 潞西市| 徐汇区| 剑川县| 乌什县| 天气| 洪江市| 册亨县| 融水| 崇文区| 滦南县| 江都市| 湖南省| 五华县| 祁东县| 易门县| 和硕县| 同仁县| 通海县| 余干县| 新绛县| 卓资县| 阳泉市| 绥化市| 石家庄市| 花莲市| 葵青区| 拜城县| 文登市|