Delphi常用关键字用法详解
absolute: // 它使得你能够创建一个新变量, 并且该变量的起始地址与另一个变量相同. var Str: string [ 32 ]; StrLen: Byte absoluteStr; // 这个声明指定了变量StrLen起始地址与Str相同. // 由于字符串的第0个位置保存了字符串的长度, 所以StrLen的值即字符串长度. begin Str : = ' abc ' ; Edit1.Text : = IntToStr(StrLen); end ; abstract: // 它允许你创建抽象的方法, 包括有抽象方法的类称为抽象类. // Abstract关键字必须与Virtual或Dynamic关键字同时使用, 因为抽象方法必须被覆盖式实现. // 抽象类不能实例化, 抽象方法不能包含方法体. type TDemo = class private protected procedure X; virtual ; abstract ; public constructor Create ; destructor Destroy ; override ; published end ; and: // 一、表示逻辑与 if (a> 0 ) and (b> 0 ) then // 二、表示位运算 var a,b,c: Integer; begin c : = (a and