NASutils Knowledge BaseUnofficialPolski

Pascal · lesson 1 of 30 · First steps · bonusCompile a program

fpc compiles the source file into a program. You start it with ./

Programming on the NAS › Pascal in 30 lessons

01-hello.pas Download 01-hello.pas

program Hello;
begin
  WriteLn('Hello from the NAS');
end.

Terminal

$ fpc -v0 01-hello.pas
Free Pascal Compiler version 3.2.2 [2026/11/07] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
$ ./01-hello
Hello from the NAS

The numbers or the date differ on your NAS.

Exercise

Print a second line.