Pascal is the most popular language used in programming. It is relatively simple and is even included in the compulsory computer science curriculum in some mainstream schools. It also comes with a compiler, which makes writing programs even easier.
Instructions
Step 1
Open a programming environment to write a program in pascal. To do this, run the Turbo.exe file. It is located in the folder with the installed program. This will open a blue window. This is the editor in which you have to write the program.
Step 2
In order to implement a program, give it a name and a set of variables used in it. For example, if the task is to add two numbers, then you need to create three variables denoting the first term, the second term and the sum.
Step 3
Do not use Russian letters, punctuation marks or special characters for the name (this is a simple language, and everything should be as simple as possible - in Latin). Otherwise, the program will give an error when saving or work incorrectly as a result.
Step 4
Think about the type of variables. Let's take the same addition operation. Only numbers can be used in it, so set the type to Integer, i.e. integer.
Step 5
Perform the operation. In the case of addition, everything is simple, but to write more complex programs, you need to know the commands used in Pascal. The addition operation will look like this: Program Addition; Var A, B, C: integer: BeginA: = B + C: End.
Step 6
After writing the program, save it, compile it and run it. Save by selecting the appropriate item in the menu - F10 / File / Save. A window will open where you must select a file name and path to save it. Compile the program by holding Alt + F9. If the application does not contain errors, the message Compile successful: press any key will appear.
Step 7
Start the program by pressing the Ctrl + F9 buttons. If no information about errors appears when starting the program, then it is working correctly and you have coped with the task.