type HRESULT = type Longint; 这一句是什么意思,谢谢
解决方案 »
- 如何判断某一个应用程序实例目前开启的文件,并使其MainForm提到萤幕的最上方﹖
- 在程序里循环建立panel,闪的太厉害,有什么好方法不闪呢?
- 高手门关于ado数据插入异常问题
- 中文的编码问题!!
- 动态连接库中的入口\出口函数你测试过没有?
- 刚学DELPHI,问几个DELPHI基本问题,欢迎来拿分
- delphi中的疑问
- 如何保存和打开注册文件?
- 如何修改Memproof检测到的内存泄漏?
- 有谁知道 c:\winnt\system32\cidaemon.exe 这个可执行文件是作什么用的?它好象在启动时占了我很大的CPU资源。
- 对于unicode 中的wcslen 在DELPH中如何调它,得包含哪个PAS,或者有没有与之对应的字符串函数?
- application.message使用问题
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;
type HRESULT = type Longint;
type HRESULT = Longint;
有小小分别。
第一种定义的话,HRESULT和Longint被当成两种不同的类型,虽然它们接受的数据类型是一样的;
而第二种定义的话,则把两者看成是相同的。
比如:
i:Longint;
j:HRESULT;
如果第一种定义:j := i;//错
如果第二种定义:j := i;//对大概是这样吧。其实我也不是很理解,哈哈!!
type HRESULT = Longint;
----------------
var
H:HResult;
begin
H:=500;
showmessage(inttostr(H));
end;
定义不一样,这一句都能运用,不知为何
1. 請看幫助文件...樓上的弟兄們都說的很清楚了哦對於這些語言細節 你知道其大體的用法以及一些區別 即可
最開始的學習可以從大處著眼定义不一样,这一句都能运用,不知为何
// 當然可以用了 其實它們都相當於 LongInt類型。。你說怎麼部能用哪。。
type HRESULT = type Longint;
type HRESULT = Longint;定义以上这两种和定义 longint有优点在哪里啊