上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 最初的Pascal 语言是以一些简单的概念为基础建立起来的,这些概念现在普遍出现在编程语言中。最重要的概念当属数据类型,数据类型决定了变量可取的值,以及可在这些值上进行的操作。Pascal 数据类型的概念强于C语言及早期的BASIC语言,在C语言中算术数据类型是可以互换的,而早期的BASIC语言中根本没有与数据类型相似的概念。变量 Pascal 变量在使用前必须声明,声明变量时必须指定一种数据类型。下面是变量声明的例子:var Value: Integer; IsCorrect: Boolean; A, B: Char; 关键字var可以在许多地方使用,例如放在函数或过程的开始部... 阅读全文
posted @ 2011-12-15 14:14 endsnow 阅读(433) 评论(0) 推荐(0)
摘要: 进入正题前先谈一下Pascal代码编写风格的问题。“除了遵循语法规则外,你应该怎样来写代码呢?” 关于这个问题各人答案会有不同,因为各人喜欢的风格不同。总的来说,任何编码风格的目标都是使代码清楚、明晰,采用某种风格和格式只是一种简略方法,用于更清楚地表达你的代码要干什么。实现代码清楚明晰的基本原则是保持代码的一致性,也就是无论选用哪种风格,在整个工程中要始终保持同一风格。注释 在Pascal中,注释括在大括号中或带星号的圆括号中。Delphi 也认可C++ 风格的注释,即把注释放在双斜线后。例如{this is a comment}(* this is another comment *... 阅读全文
posted @ 2011-12-15 13:57 endsnow 阅读(378) 评论(0) 推荐(0)
摘要: Delphi中使用的面向对象pascal编程语言并不是borland公司1995年发布可视化开发环境Delphi时才有的,它只是已有borland pascal产品的简单扩展。 Borland没有发明pascal,但它推广并扩展了pascal。这一章对pascal语言的历史背景及其发展历程作一简短回顾。沃斯的pascal Pascal 语言最初由瑞士苏黎士理工学院的尼古拉斯-沃斯(Niklaus Wirth)教授在1971年设计, 作为Algol语言(1960年设计)简化本用于教学目的。 设计Pascal时,许多编程语言业已存在,但只有FORTRAN、C、Assembler、COBOL... 阅读全文
posted @ 2011-12-15 13:49 endsnow 阅读(412) 评论(0) 推荐(0)
摘要: library AngToArcDLL; //dll工程的工程名{ Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function 阅读全文
posted @ 2011-12-13 15:29 endsnow 阅读(200) 评论(0) 推荐(0)
摘要: library AngToArcDLL; //dll工程的工程名{ Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function 阅读全文
posted @ 2011-12-13 15:09 endsnow 阅读(248) 评论(0) 推荐(0)
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;type TForm1 = class(TForm) Label1: TLabel; Timer1: TTimer; Timer2: TTimer; procedure FormPaint(Sender: TObject); procedure Timer1Timer(Sender: TObject); ... 阅读全文
posted @ 2011-12-13 11:13 endsnow 阅读(283) 评论(0) 推荐(0)
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, MPlayer;type TForm1 = class(TForm) MediaPlayer1: TMediaPlayer; Panel1: TPanel; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton;... 阅读全文
posted @ 2011-12-12 13:37 endsnow 阅读(164) 评论(0) 推荐(0)
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Animate1: TAnimate; Animate2: TAnimate; procedure FormCreate(Sender: T... 阅读全文
posted @ 2011-12-12 13:18 endsnow 阅读(129) 评论(0) 推荐(0)
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, mmsystem;type TForm1 = class(TForm) procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public ... 阅读全文
posted @ 2011-12-12 11:28 endsnow 阅读(411) 评论(0) 推荐(0)
摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, ExtCtrls;type TForm1 = class(TForm) PaintBox1: TPaintBox; MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; sin1: TMenuItem; cos1: TMenuItem; cls1: TMenuItem;... 阅读全文
posted @ 2011-12-12 11:11 endsnow 阅读(194) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 9 下一页