什么时候可以查高考成绩| mr是什么检查项目| 向日葵代表什么| 心咒是什么意思| 男怕初一女怕十五是什么意思| 乾元是什么意思| 缺维生素c会得什么病| 牙膏属于什么类商品| 低俗是什么意思| 孕妇吸二手烟对胎儿有什么影响| 炖肉放山楂起什么作用| 七夕什么时候| 日本豆腐是用什么做的| 桃对什么| 电饭煲内胆什么材质好| 吃什么蔬菜对眼睛好| 月黑风高什么意思| 射手是什么象星座| 化疗和靶向有什么区别| 起痱子是什么原因| 谁也不知道下一秒会发生什么| 老鸨是什么| 尿毒症是什么原因引起的| 身怀六甲什么意思| 属羊的是什么星座| 请人原谅说什么| 金字旁的字有什么| 西辽国在现今什么地方| 红糖有什么功效| 西药是用什么材料做的| 来月经小腹痛是什么原因| 拔罐有什么作用和功效| 广州番禺有什么好玩的地方| 做些什么| 竖心旁的字与什么有关| 血管钙化是什么意思| 喝什么有助于睡眠| 吃什么补充胶原蛋白| ige高是什么意思| 中暑用什么药| 店小二是什么意思| 后生可畏是什么意思| 万言万当不如一默是什么意思| 被强奸是什么感觉| 四月十六日是什么星座| aut0是什么意思| 卡密是什么| 艾拉是什么药| 1978年属什么的| lee是什么牌子中文名| 来姨妈吃什么好| 手癣是什么原因引起的| cla是什么| 男子精少吃什么药可以生精| 氮质血症是什么意思| 刷酸是什么| 物是人非什么意思| 被褥是什么意思| 鬼门关是什么意思| 自助餐是什么意思| 良人是什么意思| nb是什么牌子| 多囊卵巢综合症是什么| 青蛙怕什么| 喉咙痒咳嗽吃什么药| 维生素d3和d2有什么区别| 脸黑的人适合穿什么颜色的衣服| 申的五行属什么| hvp是什么病毒| 为什么阴道会放气| 豆五行属什么| 右肾占位是什么意思| 吃什么会导致流产| 火疖子用什么药膏| 杨贵妃长什么样| 结婚登记需要什么证件| 高会是什么意思| 打啵什么意思| 梵天是什么意思| 中国最高军衔是什么| 马华念什么| 什么可以解酒最快方法| 支气管肺炎吃什么药| 下面瘙痒用什么药膏| 哺乳期感冒吃什么药| 捌是什么数字| 断流什么意思| 装可以组什么词| experiment是什么意思| 花生不能和什么一起吃| 尿蛋白2十吃什么药| cll是什么意思| 1985年是什么命| 乌纱帽是什么意思| 小孩磨牙是什么原因引起的| 梨花是什么生肖| 1995属什么生肖| 脚底发麻是什么原因| ccu是什么病房| 乳腺看什么科| 自欺欺人是什么意思| 几又念什么| 男人时间短什么原因| 为什么13周不让建卡了| 路过是什么意思| 维生素b3又叫什么| 敏感什么意思| 洗牙喷砂是什么意思| 嘴贱什么意思| 护士长是什么级别| 山莨菪碱为什么叫6542| 中性粒细胞是什么| 狸猫换太子是什么意思| 一本线是什么意思| 阿司匹林肠溶片治什么病| 布洛芬0.3和0.4g有什么区别| 世界上什么动物牙齿最多| 腊八蒜用什么醋比较好| 白头发吃什么维生素| 撒西不理是什么意思| 舌裂纹是什么原因| 九出十三归是什么意思| 狙击蟹吃什么| 肾结石什么原因引起的| 高血压需要注意什么| 孔雀的尾巴像什么| 哮喘吃什么药最有效| 什么家欢乐| 女人得性瘾什么症状| 月经推迟吃什么| 南瓜不能和什么一起吃| 6月14日是什么星座| 什么人容易得癌症| 血清载脂蛋白b偏高是什么意思| 弼马温是什么意思| 橄榄油的好处和坏处是什么| 红色的月亮是什么征兆| 男士内裤什么材质的好| 孕吐一般从什么时候开始| 忽冷忽热是什么意思| 念珠菌性阴道炎有什么症状| 脚气看什么科| 全麦粉是什么面粉| 梦见烧火是什么意思| 林深时见鹿什么意思| 舒字五行属什么的| 外阴痒用什么洗| 白天尿少晚上尿多什么原因| 科学家是干什么的| 指甲很薄很软是为什么| 9.22是什么星座| 世子是什么意思| 医保乙类是什么意思| 逸搏心律什么意思| 排卵是什么意思| 什么是口播| 旺字五行属什么| 黑t恤搭配什么裤子| 什么是童子| 双币信用卡是什么意思| 调侃什么意思| 胆管堵塞有什么症状| 明年是什么年啊| 牙胶是什么| 对照是什么意思| 烊化兑服是什么意思| 双肾小结石是什么意思| 自律什么意思| 歹且念什么| 三叉神经痛吃什么药效果最好| af是什么意思| 房颤挂什么科| 左氧氟沙星的功效是什么| 和风什么| 木木耳朵旁是什么字| 戊五行属什么| 飞蚊症滴什么眼药水| 小娘皮什么意思| 孕妇吃什么好| 贫血吃什么药好| 流脑是什么病| 12月20是什么星座| 孕期小腿抽筋什么原因| 什么是电汇| 一级军士长相当于什么级别| 炉甘石洗剂有什么作用| 开飞机是什么意思| hpc是什么| 叶酸什么时间段吃最好| 女人吃善存有什么好处| b超检查前要注意什么| 自控能力是什么意思| 月经量少吃什么调理| 皮肤上出现小红点是什么原因| 怀孕第一个月最怕什么| 指甲中间凹陷是什么原因| sids是什么意思| 血清碱性磷酸酶高是什么意思| 爱情鸟是什么鸟| 19年属什么| 截胡什么意思| 珍珠有什么功效| 脑梗是什么| 重磅是什么意思| 云南白药有什么功效| 数字专辑什么意思| 985大学是什么意思| 甲胎蛋白高是什么原因| 药剂师是什么专业| 磷高了会出现什么症状| 眉飞色舞是什么意思| 水克什么| 郑州有什么好玩的| 处cp是什么意思| 艾滋病有什么特征| 钟鸣鼎食是什么意思| 林子大了什么鸟都有| 什么是非甾体抗炎药| 医生为什么喜欢开地塞米松| 诙谐幽默是什么意思| 孕早期生气对胎儿有什么影响| 巨蟹男和什么座最配| 吃牛油果有什么好处和坏处| 眼睛发黄是什么原因引起的| 喝什么茶去火| 十月7号是什么星座| 二级护理是什么意思| 中药吃多了对人体有什么伤害| 黑加仑是什么| 什么是大健康| 减肥吃什么东西| legrand是什么牌子| 内秀是什么意思| 五花大绑是什么意思| 人参长什么样| 3a是什么| 吃核桃有什么好处和坏处| 尿道口灼热感吃什么药最快| 咖啡配什么好喝| 外露什么意思| 什么息| 铁剂什么时候吃最好| 大专有什么专业| 男性尿频尿急吃什么药| 血浆蛋白是什么| 不经历风雨怎能见彩虹是什么意思| 入肉是什么意思| 什么可以解酒最快方法| 固本培元什么意思| 宫颈粘液栓是什么样的| 叶酸在什么食物里最多| rs是什么意思| 棋逢对手下一句是什么| 七匹狼男装是什么档次| 葡萄糖偏高是什么意思| 大熊猫的尾巴是什么颜色| 人山人海是什么生肖| 云南古代叫什么| y是什么元素| 无创是什么检查| 排尿无力是什么原因| 真维斯属于什么档次| 祎字五行属什么| 皮肤过敏挂什么科| 百度

单边主义有悖时代潮流

百度 武汉大学樱花季限额预约“刷脸”入校2018年3月26日01:58来源:央视网    每年三月,随着春季的到来,湖北武汉大学校园内盛开的樱花,都会吸引海内外游客慕名而来。

A "Hello, World!" program is usually a simple computer program that emits (or displays) to the screen (often the console) a message similar to "Hello, World!". A small piece of code in most general-purpose programming languages, this program is used to illustrate a language's basic syntax. Such a program is often the first written by a student of a new programming language,[1] but it can also be used as a sanity check to ensure that the computer software intended to compile or run source code is correctly installed, and that its operator understands how to use it.

History

edit
?
"Hello, World!" program handwritten in the C language and signed by Brian Kernighan (1978)

While several small test programs have existed since the development of programmable computers, the tradition of using the phrase "Hello, World!" as a test message was influenced by an example program in the 1978 book The C Programming Language,[2] with likely earlier use in BCPL. The example program from the book prints "hello, world", and was inherited from a 1974 Bell Laboratories internal memorandum by Brian Kernighan, Programming in C: A Tutorial:[3]

main( ) {
        printf("hello, world");
}

In the above example, the main( ) function defines where the program should start executing. The function body consists of a single statement, a call to the printf() function, which stands for "print formatted"; it outputs to the console whatever is passed to it as the parameter, in this case the string "hello, world".

The C-language version was preceded by Kernighan's own 1972 A Tutorial Introduction to the Language B,[4] where the first known version of the program is found in an example used to illustrate external variables:

main( ) {
    extrn a, b, c;
    putchar(a); putchar(b); putchar(c); putchar('!*n');
}
 
a 'hell';
b 'o, w';
c 'orld';

The program above prints hello, world! on the terminal, including a newline character. The phrase is divided into multiple variables because in B a character constant is limited to four ASCII characters. The previous example in the tutorial printed hi! on the terminal, and the phrase hello, world! was introduced as a slightly longer greeting that required several character constants for its expression.

The Jargon File reports that "hello, world" instead originated in 1967 with the language BCPL.[5] Outside computing, use of the exact phrase began over a decade prior; it was the catchphrase of New York radio disc jockey William B. Williams beginning in the 1950s.[6]

Variations

edit
?
A "Hello, World!" program running on Sony's PlayStation Portable as a proof of concept

"Hello, World!" programs vary in complexity between different languages. In some languages, particularly scripting languages, the "Hello, World!" program can be written as one statement, while in others (more so many low-level languages) many more statements can be required. For example, in Python, to print the string Hello, World! followed by a newline, one only needs to write print("Hello, World!"). In contrast, the equivalent code in C++[7] requires the import of the C++ standard library, the declaration of an entry point (main function), and a call to print a line of text to the standard output stream.

?
Computer numerical control (CNC) machining test in poly(methyl methacrylate) (Perspex).

The phrase "Hello, World!" has seen various deviations in casing and punctuation, such as "hello world" which lacks the capitalization of the leading H and W, and the presence of the comma or exclamation mark. Some devices limit the format to specific variations, such as all-capitalized versions on systems that support only capital letters, while some esoteric programming languages may have to print a slightly modified string. Other human languages have been used as the output; for example, a tutorial for the Go language emitted both English and Chinese or Japanese characters, demonstrating the language's built-in Unicode support.[8] Another notable example is the Rust language, whose management system automatically inserts a "Hello, World" program when creating new projects.

?
A "Hello, World!" message being displayed through long-exposure light painting with a moving strip of light-emitting diodes (LEDs)

Some languages change the function of the "Hello, World!" program while maintaining the spirit of demonstrating a simple example. Functional programming languages, such as Lisp, ML, and Haskell, tend to substitute a factorial program for "Hello, World!", as functional programming emphasizes recursive techniques, whereas the original examples emphasize I/O, which violates the spirit of pure functional programming by producing side effects. Languages otherwise able to print "Hello, World!" (assembly language, C, VHDL) may also be used in embedded systems, where text output is either difficult (requiring added components or communication with another computer) or nonexistent. For devices such as microcontrollers, field-programmable gate arrays, and complex programmable logic devices (CPLDs), "Hello, World!" may thus be substituted with a blinking light-emitting diode (LED), which demonstrates timing and interaction between components.[9][10][11][12][13]

The Debian and Ubuntu Linux distributions provide the "Hello, World!" program through their software package manager systems, which can be invoked with the command hello. It serves as a sanity check and a simple example of installing a software package. For developers, it provides an example of creating a .deb package, either traditionally or using debhelper, and the version of hello used, GNU Hello, serves as an example of writing a GNU program.[14]

Variations of the "Hello, World!" program that produce a graphical output (as opposed to text output) have also been shown. Sun demonstrated a "Hello, World!" program in Java based on scalable vector graphics,[15] and the XL programming language features a spinning Earth "Hello, World!" using 3D computer graphics.[16] Mark Guzdial and Elliot Soloway have suggested that the "hello, world" test message may be outdated now that graphics and sound can be manipulated as easily as text.[17]

In computer graphics, rendering a triangle?– called "Hello Triangle"?– is sometimes used as an introductory example for graphics libraries.[18][19]

Time to Hello World

edit

"Time to hello world" (TTHW) is the time it takes to author a "Hello, World!" program in a given programming language. This is one measure of a programming language's ease of use. Since the program is meant as an introduction for people unfamiliar with the language, a more complex "Hello, World!" program may indicate that the programming language is less approachable.[20] For instance, the first publicly known "Hello, World!" program in Malbolge (which actually output "HEllO WORld") took two years to be announced, and it was produced not by a human but by a code generator written in Common Lisp (see §?Variations, above).

The concept has been extended beyond programming languages to APIs, as a measure of how simple it is for a new developer to get a basic example working; a shorter time indicates an easier API for developers to adopt.[21][22]

Wikipedia articles containing "Hello, World!" programs

edit

See also

edit

References

edit
  1. ^ Langbridge, James A. (3 December 2013). Professional Embedded ARM Development. John Wiley & Sons. ISBN?9781118887820.
  2. ^ Kernighan, Brian W.; Ritchie, Dennis M. (1978). The C Programming Language (1st?ed.). Englewood Cliffs, New Jersey: Prentice Hall. p.?6. ISBN?0-13-110163-3.
  3. ^ Kernighan, Brian (1974). "Programming in C: A Tutorial" (PDF). Bell Labs. Archived (PDF) from the original on 22 March 2022. Retrieved 9 January 2019.
  4. ^ Johnson, S. C.; Kernighan, B. W. The Programming Language B. Bell Labs. Archived from the original on 11 June 2015. Retrieved 8 August 2024.
  5. ^ "BCPL". Jargon File. Archived from the original on 3 April 2018. Retrieved 21 April 2013.
  6. ^ "William B. Williams, Radio Personality, Dies". The New York Times. 4 August 1986.
  7. ^ "C++ Programming/Examples/Hello world". Wikibooks. Archived from the original on 28 March 2022. Retrieved 16 March 2022.
  8. ^ A Tutorial for the Go Programming Language. Archived 26 July 2010 at the Wayback Machine The Go Programming Language. Retrieved 26 July 2011.
  9. ^ Silva, Mike (11 September 2013). "Introduction to Microcontrollers - Hello World". EmbeddedRelated.com. Archived from the original on 22 May 2015. Retrieved 19 May 2015.
  10. ^ George, Ligo (8 May 2013). "Blinking LED using Atmega32 Microcontroller and Atmel Studio". electroSome. Archived from the original on 5 November 2014. Retrieved 19 May 2015.
  11. ^ PT, Ranjeeth. "2. AVR Microcontrollers in Linux HOWTO". The Linux Documentation Project. Archived from the original on 2 May 2015. Retrieved 19 May 2015.
  12. ^ Andersson, Sven-?ke (2 April 2012). "3.2 The first Altera FPGA design". Raidió Teilifís éireann. Archived from the original on 21 May 2015. Retrieved 19 May 2015.
  13. ^ Fabio, Adam (6 April 2014). "CPLD Tutorial: Learn programmable logic the easy way". Hackaday. Archived from the original on 20 May 2015. Retrieved 19 May 2015.
  14. ^ "Hello". GNU Project. Free Software Foundation. Archived from the original on 29 May 2014. Retrieved 7 July 2017.
  15. ^ Jolif, Christophe (January 2003). "Bringing SVG Power to Java Applications". Sun Developer Network.
  16. ^ de Dinechin, Christophe (24 July 2010). "Hello world!". Grenouille Bouillie.
  17. ^ "Teaching the Nintendo Generation to Program" (PDF). bfoit.org. Archived from the original (PDF) on 5 May 2016. Retrieved 27 December 2015.
  18. ^ Vries, Joey de (2020). Learn OpenGL - Graphics Programming. Kendall & Welling. p.?26. ISBN?978-90-90-33256-7.
  19. ^ Beuken, Brian (January 2018). "Coding games on the Raspberry Pi in C/C++ Part 01". The MagPi. No.?65. p.?57. next time we will expand our code to start working with graphics and the famous 'hello triangle' code that absolutely no one uses except game coders
  20. ^ O'Dwyer, Arthur (September 2017). Mastering the C++17 STL: Make full use of the standard library components in C++17. Packt Publishing Ltd. p.?251. ISBN?978-1-78728-823-2. Retrieved 4 December 2019.
  21. ^ Wiegers, Harold (28 June 2018). "The importance of "Time to First Hello, World!" an efficient API program". Archived from the original on 19 February 2020. Retrieved 19 February 2020.
  22. ^ Jin, Brenda; Sahni, Saurabh; Shevat, Amir (29 August 2018). Designing Web APIs: Building APIs That Developers Love. O'Reilly Media. ISBN?9781492026877. Retrieved 19 February 2020.
edit
高我是什么意思 做什么生意 胃食管反流吃什么中成药最好 走肾不走心什么意思 馒头逼是什么
一暴十寒什么意思 病毒性感冒咳嗽吃什么药效果好 午时是什么时候 日月星辰下一句是什么 白玫瑰的花语是什么
久旱逢甘露是什么意思 食指中指交叉什么意思 胡萝卜和什么不能一起吃 什么时候开始胎教 1014是什么星座
怀孕几天后有什么反应 多吃洋葱有什么好处 肚脐周围疼是什么原因 偏头疼是什么原因 6月25日是世界什么日
张飞的武器是什么hcv8jop1ns5r.cn 屁股长痘是什么原因hcv8jop3ns6r.cn 2017是什么年hcv9jop5ns3r.cn 灵芝的功效与作用是什么hkuteam.com 抗着丝点抗体阳性是什么hcv8jop5ns8r.cn
快乐的反义词是什么hcv8jop2ns7r.cn 肾结石要注意些什么ff14chat.com 吃了火龙果不能吃什么sanhestory.com 耕的左边读什么hcv9jop0ns4r.cn 看诊是什么意思hcv8jop1ns4r.cn
东南属什么五行hcv8jop4ns4r.cn 丘疹性荨麻疹吃什么药hcv9jop2ns6r.cn 吃什么补镁hcv8jop2ns8r.cn 西安吃什么hcv9jop1ns6r.cn 吃止痛药有什么副作用hcv8jop6ns2r.cn
感冒后咳嗽吃什么药520myf.com york是什么牌子hcv8jop0ns4r.cn 吃什么愈合伤口恢复最快hcv8jop5ns8r.cn 胸是什么hcv8jop7ns4r.cn 甘草有什么功效hcv9jop4ns7r.cn
百度