C ++函数调用表达式吗? [英] Is C++ function call an expression?

查看:55
本文介绍了C ++函数调用表达式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个函数产生一个结果,可以用作另一个函数参数的参数.因此,是一个像这样的函数调用:

A function produces a result, can be used as argument of another function parameter. So, is a function call like:

f(1,2,3)

被视为表情"?谢谢.

推荐答案

C ++标准(N3376,第5.1节)将表达式指定为:

The C++ standard (N3376, §5.1) specifies an expression as:

表达式是指定运算的一系列运算符和操作数.表达式可能会产生一个值,并可能导致副作用.

An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects.

同一节中的其他内容(第5.2.2节):

Further in the same section (§5.2.2):

函数调用是一个后缀表达式,后跟括号,其中包含可能是空的,逗号分隔的表达式列表,这些表达式构成了函数的参数.

A function call is a postfix expression followed by parentheses containing a possibly empty, comma-separated list of expressions which constitute the arguments to the function.

简而言之,是的.

这篇关于C ++函数调用表达式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆