文档详情

计算机专业外文翻译.pdf

发布:2025-04-11约2.25万字共24页下载文档
文本预览下载声明

计算机专业外文翻译

毕业设计英文翻译作者: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

显示全部
相似文档