![]() ![]() The first line of the program program HelloWorld indicates the name of the program. ![]() Let us look various parts of the above program: the end of main program blockįollowing is a simple pascal code that would print the words "Hello, World!": program HelloWorld uses crt //Here the main program block starts begin writeln ( 'Hello, World!' ) end procedure // procedure declarations,if any //local variables begin. Following format shows the basic syntax for a Pascal program: program //name of the program uses // comma delimited names of libraries you use const // global constant declaration block var //global variable declaration block function //function declarations,if any // local variables begin. Statements and Expressions within each blocksĮvery pascal program generally have a heading statement, a declaration and an execution part strictly in that order.Before we study basic building blocks of the Pascal programming language, let us look a bare minimum Pascal program structure so that we can take it as a reference in upcoming chapters.Ī Pascal program basically consists of the following parts: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |