Basic Pascal Tutorial/Hello, World
한국어 · Deutsch · English · Español · Français · Italiano · Svenska · Български · Русский · العربية · 中文(中国) · 日本語
Hello, World (author: Tao Yue, state: unchanged)
In the short history of computer programming, one enduring tradition is that the first program in a new language is a "Hello, world" to the screen. So let's do that. Copy and paste the program below into your IDE or text editor, then compile and run it.
If you have no idea how to do this, return to the Table of Contents. Earlier lessons explain what a compiler is, give links to downloadable compilers, and walk you through the installation of an open-source Pascal compiler on Windows.
program Hello;
begin
writeln ('Hello, world.');
end.The output on your screen should look like:
Hello, world.If you're running the program in an IDE, you may see the program run in a flash, then return to the IDE before you can see what happened. See the bottom of the previous lesson for the reason why. One suggested solution, adding a readln to wait for you to press Enter before ending the program, would alter the "Hello, world" program to become:
program Hello;
begin
writeln ('Hello, world.');
readln;
end.From the Free Pascal wiki, page "Basic Pascal Tutorial/Hello, World", as it stood on 2022-08-20 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. 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.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
