作者leicheong (睡魔)
看板Programming
标题Re: [问题] alias?
时间Thu Feb 1 16:13:29 2007
※ 引述《yorjing (托儿所婴儿)》之铭言:
: 请为各位大大
: 这是什麽?
: 好像很常见
: 可是在网路上又查不到想要的
: http://0rz.tw/e62om
: 囧
: 请问一下alias在程式语言里面代表什麽?
: 有请各位大大指导一下
代表「别称」.
例如VB里的:
Private Declare Function GetWindowText Lib "user32.dll" Alias
"GetWindowTextW" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As
Long) As Long
就表示你在Code中使用GetWindowText()时, 其实是在用GetWindowTextW()
也就是说GetWindowText()是GetWindowTextW()的Alias.
这是维护旧code时很常见的做法.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 202.134.126.84
※ 编辑: leicheong 来自: 202.134.126.84 (02/01 16:14)
1F:推 yorjing:恩 谢谢大大解答 61.216.150.133 02/01 19:02