选择一个能够说明函数用途的名称(并减少函数使用的参数数量)是确保易于使用的一个好方法。
Choosing a name that explains the purpose of a function (as well as reducing the number of arguments the function takes) is a good way to ensure ease of use.
这个函数通常用于调试,但是它在内核中还有许多其他用途。
This function is commonly used for debugging, but it has many other USES within the kernel.
现在,您可以定义一个简单函数,其用途只是告诉您它所拥有的参数数量并显示这些参数,如清单1所示。
Now you can define a simple function to do nothing more than tell you how many parameters it has and display them as shown in Listing 1.
应用推荐