Sign in Join
Wiki copytemporary

Basic Pascal Tutorial/Hello, World/zh CN: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11Hello, World (原作者: Tao Yue, 状态: 未更改)
22
33在计算机程序设计不长的历史中,一个经久不衰的传统就是学一门新语言的时候的第一个程序是显示一个"Hello, world"到屏幕上。所以我们开始吧!复制粘贴下面的程序到你的IDE或者文本编辑器中,然后编译并运行它。
44
55如果你不知道怎么做,返回到目录表。上一页的课程讲解了编译器的作用,给出了可以下载的编译器的链接,还教你在Windows系统上安装了一个开源Pascal编译器。
66```
77program Hello;
88 begin
99 writeln ('Hello, world.')
1010 end.
1111```
1212
1313你屏幕上的输出应该像这样:
1414```
1515Hello, world.
1616```
1717
1818如果你正在一个IDE中运行程序,你可能只看到程序一闪而过,在你看清结果之前又回到了IDE。如果不知道原因,请参见上一页的底部。一个建议的解决办法是,添加一个readln让程序在结束之前等待你按回车键,把"Hello, world"程序改成这样:
1919```
2020program Hello;
2121 begin
2222 writeln ('Hello, world.');
2323 readln
2424 end.
2525```
2626
2727[[Basic Pascal Tutorial/Compilers/zh CN|上一页]] | [[Basic Pascal Tutorial/Contents/zh CN|目录]] | [[Basic Pascal Tutorial/Chapter 1/Program Structure/zh CN|下一页]]
2828---|---|---
2929
3030---
31-*From the Free Pascal wiki, page "Hello, World/zh CN", as the Internet Archive kept it on 2023-03-30. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
31+*From the Free Pascal wiki, page "Hello, World/zh CN", as the Internet Archive kept it on 2023-03-30, last changed on 2022-08-20. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history