type HRESULT = type Longint; 这一句是什么意思,谢谢

解决方案 »

  1.   

    Type identity is almost straightforward. When one type identifier is declared using another type identifier, without qualification, they denote the same type. Thus, given the declarationstype
      T1 = Integer;
      T2 = T1;
      T3 = Integer;
      T4 = T2;T1, T2, T3, T4, and Integer all denote the same type. To create distinct types, repeat the word type in the declaration. For example,type TMyInteger = type Integer;creates a new type called TMyInteger which is not identical to Integer.Language constructions that function as type names denote a different type each time they occur. Thus the declarationstype
      TS1 = set of Char;
      TS2 = set of Char;create two distinct types, TS1 and TS2. Similarly, the variable declarationsvar
      S1: string[10];
      S2: string[10];create two variables of distinct types. To create variables of the same type, usevar S1, S2: string[10];ortype MyString = string[10];
    var
      S1: MyString;
      S2: MyString;
      

  2.   

    自定义数据类型HRESULT的基础类型是Longint;
      

  3.   

    To largewang(成都:王珍义[老王][C#学习中断])            那这个了  Type HRESULT=Longint;了
      

  4.   

    他的意思应该是定义了一个叫HRESULT的类,结构和LONGINT一样;也就是可以当作LONGINT用;我是这么理解的,请指正.
      

  5.   

    简单的说,
    type HRESULT = type Longint;
    type HRESULT = Longint;
    有小小分别。
    第一种定义的话,HRESULT和Longint被当成两种不同的类型,虽然它们接受的数据类型是一样的;
    而第二种定义的话,则把两者看成是相同的。
    比如:
      i:Longint; 
      j:HRESULT;
    如果第一种定义:j := i;//错
    如果第二种定义:j := i;//对大概是这样吧。其实我也不是很理解,哈哈!!
      

  6.   

    type HRESULT = type Longint;
    type HRESULT = Longint;
                               
    ----------------
    var
    H:HResult;
    begin
       H:=500;
       showmessage(inttostr(H));
    end;
    定义不一样,这一句都能运用,不知为何
      

  7.   

    :->
    1. 請看幫助文件...樓上的弟兄們都說的很清楚了哦對於這些語言細節 你知道其大體的用法以及一些區別 即可 
    最開始的學習可以從大處著眼定义不一样,这一句都能运用,不知为何
    // 當然可以用了 其實它們都相當於 LongInt類型。。你說怎麼部能用哪。。
      

  8.   

    To: beyondtkl老师
    type HRESULT = type Longint;
    type HRESULT = Longint;定义以上这两种和定义 longint有优点在哪里啊