内容源自Delphi XE5 UPDATE 2官方帮助《Delphi Reference》,本人水平有限,欢迎各位高人修正相关错误!
也欢迎各位加入到Delphi学习资料汉化中来,有兴趣者可QQ:[email protected]
Language Overview
第一章 语言概述
Delphi is a high-level, compiled, strongly typed language that supports structured and object-oriented design. Based on Object Pascal, its benefits include easy-to-read code, quick compilation, and the use of multiple unit files for modular programming. Delphi has special features that support the RAD Studio component framework and environment. For the most part, descriptions and examples in this language guide assume that you are using Embarcadero development tools.
Delphi是一种高级编译语言,是支持结构化和面向对象设计的强类型语言。基于Object Pascal,它的优点包括代码的易读性、快速编译,以及支持多个单元文件从而实现模块化编程。Object Pascal具有一些特性,以支持英巴卡迪诺RAD组件框架和环境。在很大程度上,本语言参考的说明和示例假定你使用英巴卡迪诺公司的开发工具。
Most developers using Embarcadero software development tools write and compile their code in the integrated development environment (IDE). Embarcadero development tools handle many details of setting up projects and source files, such as maintenance of dependency information among units. The product also places constraints on program organization that are not, strictly speaking, part of the Object Pascal language specification. For example, Embarcadero development tools enforce certain file- and program-naming conventions that you can avoid if you write your programs outside of the IDE and compile them from the command prompt.
绝大多数使用英巴卡迪诺开发工具的开发者是在IDE(集成开发环境)环境下编写代码并进行编译。英巴卡迪诺开发工具帮助我们设置工程和源文件的许多细节,比如维护单元的依赖信息。并且,使用这些工具在程序的组织上还有一些限制,严格说来,这不是Object Pascal语言规范的一部分。比如,英巴卡迪诺开发工具遵循某些文件和程序的命名约定,若你在IDE以外编写代码并使用命令行来编译,你可以避开这些限制。
This language guide generally assumes that you are working in the IDE and that you are building applications that use the Visual Component Library (VCL). Occasionally, however, Delphi-specific rules are distinguished from rules that apply to all Object Pascal programming.
这份语言指南假设你在IDE环境下工作,并且使用可视化组件库(VCL)创建应用程序。但有时候,Delphi一些特定的规则和Object Pascal的通用规则并不相同。
This section covers the following topics:
本节包括以下主题:
Program Organization. Covers the basic language features that allow you to partition your application into units and namespaces.
程序组织。涵盖了基本的语言功能,使您能够将应用程序分割成单元和命名空间。
Example Programs. Small examples of both console and GUI applications are shown, with basic instructions on running the compiler from the command-line.
示例程序。在控制台和GUI应用程序上显示的小例子,以及在命令行编译运行基本指令。