返回码为0就说明没有错误。
而另一种实现只是无声地返回,没有错误消息,也没有不寻常的退出代码。
The other just returns silently; no error message, no unusual exit code.
既然所有错误都会导致退出,那么如果我们从process_input函数返回,则意味着没有错误,因此我们从main返回0。
Since all errors cause an exit, if we return from the process_input function, it means there was no error, so we return 0 from main .
由于我们在这一示例中没有实现任何元数据服务,所以该方法返回一个长度为0的数组(返回null将表明有错误)。
Since we implement no metadata service in this example, the method returns an array with length 0 (returning null would have indicated an error).
如果有错误发生,返回值为- 1,例如没有可生成的语音文件格式。
If an error occurs then the result is -1. This can happen, for example, if you ask for a non-existent format.
如果有错误发生,返回值为- 1,例如没有可生成的语音文件格式。
If an error occurs then the result is -1. This can happen, for example, if you ask for a non-existent format.
应用推荐