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

Hello World!

It's somewhat traditional when learning programming languages to begin with a Hello World example. A Hello World program is simply using your code to display or log the text Hello World. It's always been the general starting point because sometimes just getting your code environment set up and having your code executing correctly is half the battle. At least, this was more the case in older programming languages.

Swift makes this easier than ever, and without going into the structure of a Swift file (which we shall do later on and is also much easier than Objective-C and past languages), here's how you create a Hello World program:

print("Hello, World!")

That's it! That is all you need to have the text Hello World appear in Xcode's debug area output.

主站蜘蛛池模板: 玛多县| 永嘉县| 苍梧县| 深州市| 赣榆县| 页游| 清丰县| 湘潭县| 平原县| 大同市| 呼和浩特市| 吴川市| 滁州市| 清徐县| 邛崃市| 商河县| 宁蒗| 明星| 清新县| 唐海县| 东莞市| 大厂| 湾仔区| 遵化市| 资兴市| 河津市| 安丘市| 玛沁县| 琼中| 平和县| 平南县| 昌宁县| 开鲁县| 明溪县| 磐安县| 祁阳县| 临武县| 南投县| 陵川县| 湾仔区| 祥云县|