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

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.

主站蜘蛛池模板: 贵德县| 平乐县| 石首市| 抚顺县| 北川| 江西省| 教育| 台南县| 龙里县| 宿州市| 和硕县| 长葛市| 河北区| 娄底市| 镇江市| 谢通门县| 垣曲县| 湘阴县| 武功县| 大田县| 余庆县| 油尖旺区| 隆林| 祁门县| 梧州市| 汕头市| 尼勒克县| 五河县| 浙江省| 瑞昌市| 镇江市| 夏河县| 定结县| 封丘县| 竹溪县| 大悟县| 泰和县| 奈曼旗| 葫芦岛市| 五大连池市| 星子县|