函数调用 (C)Function Call (C)

“函数调用”是包含被调用函数的名称或函数指针的值以及(可选)传递给函数的自变量的表达式。A "function call" is an expression that includes the name of the function being called or the value of a function pointer and, optionally, the arguments being passed to the function.

语法Syntax

postfix-expression:postfix-expression:
postfix-expression ( argument-expression-list opt)postfix-expression ( argument-expression-list opt)

argument-expression-list:argument-expression-list:
assignment-expressionassignment-expression

argument-expression-list , assignment-expressionargument-expression-list , assignment-expression

postfix-expression 的计算结果必须为函数地址(例如,函数标识符或函数指针值),argument-expression-list 是其值(“参数”)传递到函数的表达式的列表(用逗号分隔)。The postfix-expression must evaluate to a function address (for example, a function identifier or the value of a function pointer), and argument-expression-list is a list of expressions (separated by commas) whose values (the "arguments") are passed to the function. argument-expression-list 参数可以为空。The argument-expression-list argument can be empty.

function-call 表达式具有函数的返回值的值和类型。A function-call expression has the value and type of the function's return value. 函数不能返回数组类型的对象。A function cannot return an object of array type. 如果函数的返回类型是 void(即该函数已被声明为从不返回值),则 function-call 表达式也具有 void 类型。If the function's return type is void (that is, the function has been declared never to return a value), the function-call expression also has void type. (有关详细信息,请参阅函数调用。)(See Function Calls for more information.)

另请参阅See Also

函数调用运算符:()Function Call Operator: ()