delphi ¼Ì³ÐÀà
¼Ì³ÐÊÇΪÁ˱íÏÖÀàÓëÀàÖ®¼ä“ÊÇÒ»ÖÖ”¹Øϵ£¬ÊǶà̬´æÔڵĻù´¡£¬¼Ì³ÐÊÇÃæÏó¶ÔÏó±Ø²»¿ÉÉٵĻù´¡£¬Ö»Ö§³Ö·â×°¶ø²»Ö§³Ö¼Ì³ÐµÄÓïÑÔÖ»ÄܳÆΪ“»ùÓÚ¶ÔÏ󔣨Object-Based£©Ãæ·ÇÃæÏò¶ÔÏó“Object-Oriented”;
Object PascalÖ»Ö§³Öµ¥¼Ì³Ð£¬Ò²¾ÍÊÇÒ»¸öÅÉÉúÀàÖ»ÄÜÓÐÒ»¸ö»ùÀà
µ«¿ÉÒÔʵÏÖ¶à¸ö½Ó¿Ú
Ïà¹ØÎĵµ£º
µ±È»Óû§ÒªÏëͨ¹ýÊý¾Ýä¯ÀÀ²¿¼þ±à¼ÐÞ¸ÄÊý¾Ý¿â±íÖеļǼ×Ö¶Îʱ£¬»¹ÒªÊܵ½ÆäËüÒòËصÄÖÆÔ¼¡£³ýÁËÊý¾Ýä¯ÀÀ²¿¼þ±¾ÉíµÄReadOnlyÊôÐÔÉèÖÃΪFalseÍ⣬»¹ÒªÉèÖÃÆäÏàÓ¦µÄ×ֶβ¿¼þºÍÊý¾Ý¼¯²¿¼þµÄCanModifyÊôÐÔTrueÐÔ£»ÉèÖÃTDataSource²¿¼þµÄAutoEditÊôÐÔΪTrue£¬Èç¹ûÊý¾Ý¿â±íÊÇSQLÊý¾Ý¿â·þÎñÆ÷ÖеÄÊý¾ ......
//¶¨ÒåMyClass
TMyClass = class
GUID: string;
Name: string;
bSex: Boolean;
Tel : string;
end;
//È¡Öµ
var
obj: TMyClass;
begin
obj := TMyClass.Create;
with Memo1.Lines do
begin
Add('¶ÔÏó´óС:' + IntToStr(obj.InstanceSize));
Add('¶ÔÏóËùÔÚµØÖ·£º'+ ......
1. ²úÆ·Àà
{¡¶HeadFirstÉè¼Æģʽ¡·¹¤³§Ä£Ê½Ö®¼òµ¥¹¤³§ }
{ ²úÆ·Àà }
{ ±àÒ빤¾ß £ºDelphi7.0 }
{ ÁªÏµ·½Ê½ £ºxshlife@163.com }
unit uProducts;
interface
type
TPizza = class(TObject)
public
procedure Prepare; virt ......
ÔÚÒ»¸öµ¥ÔªÖÐÉùÃ÷µÄ¶à¸öÀ໥ΪÓÑÔªÀà
type
TMyClass = class
GUID: string;
Name: string;
bSex: Boolean;
Tel : string;
end;
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedu ......