那就是说,如果函数有确定的有效值集合或范围可作为参数,可以将检验参数是否有效的断言放在该函数代码的第一行。
That is, if a function has a certain set or range of valid values for its arguments, an assertion to this effect can be placed as the first line of code in the function.
方法有两种:创建一个工具包来封装所有本机函数;或者将本机函数直接包含到应用程序中。
This could be done in one of two ways. You could either create a toolkit that encapsulates all the native functions, or directly include native functions into an application.
有了show_users函数之后,接下来可以创建一个users . php文件,该文件将运行这个函数,并显示系统中所有用户的一个列表,对于每个用户,在用户名的旁边都有一个follow链接。
Now that you have the show_users function, you can create a users.php file that runs it and displays a list of all the users in the system, each with a link that says follow next to the user name.
有了show_users函数之后,接下来可以创建一个users . php文件,该文件将运行这个函数,并显示系统中所有用户的一个列表,对于每个用户,在用户名的旁边都有一个follow链接。
Now that you have the show_users function, you can create a users.php file that runs it and displays a list of all the users in the system, each with a link that says follow next to the user name.
应用推荐