The process of installing the Lazarus does not have to say much, it is a fool-style.
Opening Lazarus,lazarus automatically creates a new window-form application. You will see five of Windows.
Main Window
This window displays a title bar, a menu bar, and a toolbar.
Object View Window
This window displays property information for the form and form created
Source Code Editing window
This window is used to view and edit source code
message window
This window displays information about the compilation run
Form1 window created by default
This is the new application auto-created
Well, introduce so much, below to get to the chase.
Turn off the four windows outside the main window first. You may be prompted when you turn off Form1, click No
1. New Program Project
Project-->new Project (Project--new project, some may translate to project--new projects)
Select Program, click OK
If Save changes Dot No
OK, the source Code editing window will automatically pop up below
2. Edit Run
Fill in the following between Begin and end
Writeln (' Hello world! ');
The complete code is as follows
Program Project1; {$mode OBJFPC} {$H +}uses {$IFDEF unix}{$IFDEF usecthreads} cthreads, {$ENDIF} {$ENDIF} Classes {You can add Units after this};begin writeln (' Hello world! '); Readln;end.
Then click the Green Triangle button in the main window to run
If you write a program that does not have a problem, the message window prompts the compilation to succeed
The console will then pop up to show the problem we're going to output
Since we are only using the output for the time being, we can delete the second line behind the begin
After deletion
The complete code is as follows
Program Project1;begin writeln (' Hello world! '); Readln;end.
Click the green triangle again to run.
At this point, the first program is finished debugging.
3. Save
The saved file is in LPR format, not in PAS format. The LPR format contains information about the form, compile, run, and so on, in addition to the source code information.
Write the first program in Pascal's Hello World with Lazarus