delph i2007学习笔记(二)

2016-02-19 14:41 5 1 收藏

最近很多朋友喜欢上设计,但是大家却不知道如何去做,别担心有图老师给你解答,史上最全最棒的详细解说让你一看就懂。

【 tulaoshi.com - 编程语言 】

  现在学的是delphi 的类,原D7的类我不就不记了,记下与D7不同的地方

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/bianchengyuyan/)

  a.class abstract 纯虚类,不能实例化的类

type TAbstractClass = class abstract  procedure SomeProcedure;end;

   以前的做法是在 procedure 的后面与 abstract ,现在只移类的说明上,只是意思一样,就是直观点少打字 呵呵.

  b.class sealed 这个我目前不知是什么意思,可能是不能继承的类

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/bianchengyuyan/)

type TAbstractClass = class sealed  procedure SomeProcedure;end;

  c.class const 类的常量,这个地方在D7内可以定类的方法一样能实现

type TClassWithConstant = class  public   const SomeConst = 'This is a class constant'; end;      procedure TForm1.FormCreate(Sender: TObject);begin ShowMessage(TClassWithConstant.SomeConst); //引用时,只写类名就可能引用,不必实例化end;d.class type 类的类型, 在类的层次下可以定record,class子类什么的,这个将数据的集中体现....type TClassWithClassType = class private  type   TRecordWithinAClass = record   SomeField: string;  end; public    class var   RecordWithinAClass: TRecordWithinAClass; end; ...procedure TForm1.FormCreate(Sender: TObject);begin TClassWithClassType.RecordWithinAClass.SomeField := 'This is a field of a class type declaration'; ShowMessage(TClassWithClassType.RecordWithinAClass.SomeField);end;type TOuterClass = class strict private  MyField: Integer; public  type   TInnerClass = class   public    MyInnerField: Integer;    procedure InnerProc;   end;   procedure OuterProc; end;  procedure TOuterClass.TInnerClass.InnerProc;begin ...end;

来源:https://www.tulaoshi.com/n/20160219/1607581.html

延伸阅读
标签: Web开发
jquery基本信息 jquery的官方网站: www.jquery.com jquery解释: jquery是javascript的类库,提供了大量的javascript的类库和API,方便javascript开发。 jquery API中文参考手册: http://jquery-api-zh-cn.googlecode.com/svn/trunk/index.html 前台数据提交到后台demo: 实例图: 功能点: 1....
标签: Web开发
l. 连接到数据库的方法 答:1) ODBC(Open Database Connectivity)       一个以C语言为基础访问SQL为基础数据库引擎的接口,它提供了一致的接口用于和数据库沟通以及访问数据。    2) JDBC       Java版本的ODBC 2. JDBC应用编程接口 答:JDB...
标签: Web开发
1、属性: 为所有匹配的元素设置一个计算的属性值 //为所有的input添加属性class="btn" //$("input").attr("class","btn"); 2、CSS:为每个匹配的元素添加指定的类名 //对所有的提交按钮添加样式 $("input:submit").addClass("btn"); 3、值:获得第一个匹配元素的当前值 //取的某一按钮的值 //alert($("#Button1").val()); 4、H...
标签: Web开发
基础知识: 想要结构与行为分离当然不能使用button onclick="…"/button之类的东西了,js是写在head之间的,那就说起了 window.onload——这不是一个好东西,所以就有了Jquery颇具创意的 代码如下: $(document).ready(funciton(){ … }); 当然还会更精简: 代码如下: $(function(){ … }); 所以我的第一个Jquery脚本就是这...
标签: PHP
 1、  PHP片段四种表示形式。 标准tags:<?php           ? short tags:<?              ? 需要在php.ini中设置short _open_tag=on,默认是on asp tags: <%   &nb...

经验教程

331

收藏

41
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部