How do I know where a function or type is defined?

zhaozj2021-02-08  260

How to use functions or types that don't know where to define

M author: soaringbird () 2001-02-23 21:07:37

I found that there are a lot of netizens who ask for a function, class, global variables, which unit is defined in. In fact, finding what they define is very simple. Method 1, find it in Delphi Help. In the help topic / index input type name, Delphi helps can locate this type of associated help (if any, if there is any one, there is a unit name, which is a unit name, which is the unit where this class defines the unit. . In this case you can read a detailed description of this class or function. But some types or functions such as some Win API extremely used structures are not in the help, which can be applied two. Method 2, find it in the Delphi library source code directory. There is a directory below: Source, below it is Delphi source code, you use Windows search in this directory, enter the class name, search, search, you can find a few PAS files One of them is what you want. In this way you can find the statement of the type and function. But there are still some classes that can not be found because Delphi does not provide their source code, such as QuickReport's things, then you can use the method three. Method 3 to Delphi / Lib. Delphi / lib under Delphi's compiled unit file (* .DCU), you can find a few DCUs with Windows search in this directory, enter the class name you want to find in this directory. File, one is what you want. Through the above three methods, you can find the most things you want. But add some unused APIs, or there is no public API, you can only declare themselves. Time to supplement a method: Enter this function in the code editor, then hold down the CTRL button, and finally use the mouse click to automatically open or track the definition of the function. I think this approach is also very simple. - Author: soaringbird [] ※ Source: Netease virtual community Beijing Railway Station. ※ Showskyws Modified to: 2001.02.23 21:26

转载请注明原文地址:https://www.9cbs.com/read-3121.html

New Post(0)