Difference between revisions of "Overview of Free Pascal and Lazarus/ru"

From Lazarus wiki
Jump to navigationJump to search
(Use correct template)
Line 15: Line 15:
 
You can create a console app with no more than a text editor and the Free Pascal compiler. You don't have to use Lazarus to develop console apps. However, if you prefer to work in an integrated environment, you can use Lazarus to create a project for the console app and then edit and compile the code in the Lazarus IDE.
 
You can create a console app with no more than a text editor and the Free Pascal compiler. You don't have to use Lazarus to develop console apps. However, if you prefer to work in an integrated environment, you can use Lazarus to create a project for the console app and then edit and compile the code in the Lazarus IDE.
  
=== Dynamically loadable libraries ===
+
=== Динамически-подгружаемые библиотеки (DLL) ===
  
A dynamically loadable library is usually a collection of compiled functions that can be called by other programs. As the name suggests, the library is not linked into your executable at compile-time, but instead is loaded at run-time. In Windows, a library file has a .dll extension (dynamic-link library, or DLL). In OS X, a library file has a .dylib extension (dynamic shared library). In Linux, a library file has an .so extension (shared object library). Dynamically loadable libraries are typically used to develop add-ons for other programs, to develop libraries that can be called by programs written in other languages such as C and C++, or to partition large projects into chunks so that the project's developers don't step on each other's toes. Windows itself is made up of hundreds of DLLs, as are many other large applications such as OpenOffice.org.
+
Динамически-подгружаемая библиотека обычно представляет из себя набор скомпилрованных функций, которые могут вызываться другими программами. Библиотека не прилинковывается к программе в режиме компиляции, вместо этого она загружается в рельном времени. В Windows, файл библиотеки имеет расширение .dll dynamic-link library, or DLL). В OS X, файл библиотеки имеет расширение .dylib (dynamic shared library). В Linux, файл библиотеки имеет расширение .so (shared object library). Динамически-подгружаемые библиотеки обычно используются для разработки дополнений для других программ,
 +
а также для разработки библиотек, которые могут вызываться программами, написаными на других языках, например на C и C++, или для разбиения больших проектов на кусочки, чтобы разработчики на наступали друг другу на пятки. Windows сама по себе состоит из сотен библиотек DLL, как и другие крупные приложения, например OpenOffice.org.
  
 
Like console apps, you only need a text editor and the Free Pascal compiler to develop a library, although you can also create a Lazarus project for the library and develop the library in the Lazarus IDE.
 
Like console apps, you only need a text editor and the Free Pascal compiler to develop a library, although you can also create a Lazarus project for the library and develop the library in the Lazarus IDE.

Revision as of 13:21, 7 April 2006

Deutsch (de) English (en) español (es) suomi (fi) français (fr) magyar (hu) Bahasa Indonesia (id) italiano (it) 日本語 (ja) 한국어 (ko) polski (pl) português (pt) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN) 中文(台灣)‎ (zh_TW)

Free Pascal (FPC) компилятор с открытыми исходными кодами с двумя важными особенностями: высокая совместимость с Delphi и доступность для большого колличества платформ, включая Windows, Mac OS X, и Linux. Совместимость Free Pascal с Delphi включает не только поддержку тогоже языка программирования Object Pascal который использует Delphi, но также библиотеки конструкции и классы, которые "понимает" Delphi, например System, SysUtils, StrUtils, DateUtils, Classes, Variants, Math, IniFiles and Registry, которые включены в Free Pascal и поддерживаются всеми платформами. Free Pascal также включает модули Windows, ShellAPI, BaseUnix, Unix и DynLibs для доступа к специфичным для конкретной ОС фичам. Около дюжины модулей составляют ядро обычно упоминающееся как Free Pascal run-time library (RTL).

Lazarus - это система с открытым исходным кодом, которая построена на компиляторе Free Pascal Compiler с добавлением Интегрированной Среды Разработки (IDE), которая включает в себя подсветку синтаксиса, редактор кода и визуальный проектировщик форм, а также библиотеку компонентов, которая очень хорошо совместима с Библиотекой Визуальных Компонентов Delphi (VCL). Библиотека Визуальных Компонентов Lazarus (LCL) включает эквиваленты для большинства контролов из VCL например, формы, кнопки, текстовые поля и так далее, которые используются для создания приложений, которые имеют графический интерфейс (GUI).

И Free Pascal и Lazarus написанны на Pascal. Полный исходный код доступен не только для Free Pascal compiler и Lazarus IDE, но и также для всех модулей составляющих Free Pascal RTL и Lazarus LCL.

Like Delphi, Free Pascal and Lazarus are both general-purpose programming tools, meaning you can develop a wide variety of programs with them, including the following:

Console applications

Console apps don't have a GUI. Instead they are usually launched from the console, read their input from the console, and write their output to the console. In Windows the console is usually referred to as a command prompt window. In OS X and Linux the console is referred to as a terminal window. Console apps include things like small utilities such as the Windows FC (file compare) program or the Unix cd and cp commands. Console apps can also be powerful number crunching, modeling, or data processing programs that don't need a fancy GUI because they're started by other programs or from batch files. The Free Pascal compiler and the utility programs included with it are all console apps, meaning they can be run from the console, a batch file, or from the Lazarus IDE.

You can create a console app with no more than a text editor and the Free Pascal compiler. You don't have to use Lazarus to develop console apps. However, if you prefer to work in an integrated environment, you can use Lazarus to create a project for the console app and then edit and compile the code in the Lazarus IDE.

Динамически-подгружаемые библиотеки (DLL)

Динамически-подгружаемая библиотека обычно представляет из себя набор скомпилрованных функций, которые могут вызываться другими программами. Библиотека не прилинковывается к программе в режиме компиляции, вместо этого она загружается в рельном времени. В Windows, файл библиотеки имеет расширение .dll dynamic-link library, or DLL). В OS X, файл библиотеки имеет расширение .dylib (dynamic shared library). В Linux, файл библиотеки имеет расширение .so (shared object library). Динамически-подгружаемые библиотеки обычно используются для разработки дополнений для других программ, а также для разработки библиотек, которые могут вызываться программами, написаными на других языках, например на C и C++, или для разбиения больших проектов на кусочки, чтобы разработчики на наступали друг другу на пятки. Windows сама по себе состоит из сотен библиотек DLL, как и другие крупные приложения, например OpenOffice.org.

Like console apps, you only need a text editor and the Free Pascal compiler to develop a library, although you can also create a Lazarus project for the library and develop the library in the Lazarus IDE.

On Windows, DLLs have an undeserved reputation for being overly complex and unstable. This has more to do with the way they've sometimes been installed than it does with DLLs themselves. Actually, since passing information to and from DLLs is normally done with standard, simple data types (rather than with language-specific objects or structures), this requirement forces programmers to pay more attention to what they're doing. If done right, this can result in better, more stable programs.

GUI apps

Most of the programs we use daily are GUI apps, including word processors, Web browsers, spreadsheet programs, even many development tools. Lazarus and Delphi are both good examples of full-featured GUI apps. When developing a GUI app with Lazarus, not only do you develop units of Pascal code, you also design forms containing visual controls such as buttons and list boxes. Like Delphi, form design in Lazarus is done visually. Control properties can be set in the IDE or in code.

Since the LCL controls are available on all supported platforms, a GUI app developed on one platform (for example, Windows) can be compiled on another platform (for example, OS X or Linux) without any changes to the form design or the form code files.