计算机专业外文翻译.pdf
计算机专业外文翻译
毕业设计英文翻译作者:XXX
TheDelphiProgrammingLanguage
TheDelphidevelopmentenvironmentisbasedonanobject-oriented
extensionofthe
PcisealprogramminglanguageknownasObjectPascal.ostmodern
programminglanguages
supportobject-orientedprogramming(OOP).OOPlanguagesarebased
onthreefundamental
concepts:encapsulation(usuallyimplementedwithclasses),
inheritance,andpolymorphism
(orlatebinding).
IClassesandObjects
DelphiisbasedonOOPconcepts,andinparticularonthedefinition
ofnewclasstypes.
TheuseofOOPispartiallyenforcedbythevisualdevelopment
environment,becausefor
everynewformdefinedatdesigntime,Delphiautomatical1ydefines
anewclass.Inaddition,
everycomponentvisuallyplacedonaformisanobjectofaclass
typeavailableinoraddedto
thesystemlibrary.
AsinmostothermodernOOPlanguages(includingJavaandC#),in
Delphiaclass-type
variabledoesn*tprovidethestorageortheobject,butisonlya
pointerorreerencetothe
objectinmemory.Beoreyouusetheobject,youmustallocate
memoryoritbycreatinga
newinstanceorbyassigninganexistinginstancetothevariable:
var
Objl,0bj2:TMyClass;
begin//assignanewlycreatedobject
Objl:=TMyClass.Create;//assigntoanexistingobject
Obj2:=ExistingObject;
ThecalltoCreateinvokesadeaultconstructoravailableorevery
class,unlesstheclass
redeinesit(asdescribedlater).Todeclareanewclassdatatype
inDelphi,withsomelocal
dataieldsandsomemethods,usetheollowingsyn