MPL Documentation

Your First Program

Program First;

uses Display;

   Write('Hello World!');

Source Explanation

  1. Program is a file header - letting Modern Pascal know this is a program. In this case, named "First".
  2. uses informs Modern Pascal additional run-time libraries to load. In this case, the keyboard and display library "display".
  3. Begin ... End. is the main code block - the instructions that produce this algorithm of this program.

Code Block Explanation

  1. ClrScr stands for "Clear Screen" and erases everything in the comand prompt (console, terminal).
  2. Write displays everything between the apostrophes (known as a string).
  3. ReadKey makes the program wait until the user presses any key.