陈述和表达。 [英] Statements and expressions.

查看:80
本文介绍了陈述和表达。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C中,


你叫什么用分号分隔?


表达式和表达式之间有什么区别声明?


谢谢。

In C,

what do you call that which is separated by semicolon?

what is the difference between an expression and a statement?

Thank you.

推荐答案

Martin Johansen< ma ****** @ is.online.no>潦草地写道:
Martin Johansen <ma******@is.online.no> scribbled the following:
在C中,
你用什么叫分号分隔?
表达式和语句之间的区别是什么?
In C, what do you call that which is separated by semicolon? what is the difference between an expression and a statement?




你没有C教科书吗?

" ;用分号分隔的那个可以是很多东西,但在

C中,它通常是一个声明。

语句是可执行C代码的最小单位,可以是

自行执行。表达式是任何具有值的表达式。

某些表达式符合语句(通过在
之后添加分号),但并非所有语句都符合表达式。例如,

条件和循环不是。


-

/ - Joona Palaste(pa ** ***@cc.helsinki.fi)-------------芬兰-------- \

\-- http://www.helsinki.fi/~palaste --------- ------------规则! -------- /

玫瑰是红色的,紫罗兰是蓝色的,我是schitzophrenic,我也是。

- Bob Wiley



Don''t you have a C textbook?
"That which is separated by semicolons" can be a lot of things, but in
C, it is usually a statement.
A statement is the minimum unit of executable C code that can be
executed on its own. An expression is anything that has a value.
Some expressions qualify as statements (by adding a semicolon after
them), but not all statements qualify as expressions. For example,
conditionals and loops don''t.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Roses are red, violets are blue, I''m a schitzophrenic and so am I."
- Bob Wiley


Joona I Palaste写道:
Joona I Palaste wrote:

Martin Johansen< ma ****** @ is.online.no>潦草地写了下面的内容:

Martin Johansen <ma******@is.online.no> scribbled the following:
在C中,


你怎么称之为以分号分隔的?


语句以分号结束。

表达式和语句之间的区别是什么?
what do you call that which is separated by semicolon?
Statements are terminated by semicolons.
what is the difference between an expression and a statement?



Don 你有一本C教科书吗?
用分号分隔的那本教科书可能是很多东西,但在C语言中,它通常是一个声明。
语句是可执行C代码的最小单元,可以单独执行。表达式是任何具有值的表达式。
某些表达式符合语句(通过在
之后添加分号),
但并非所有语句都有资格作为表达式。例如,
条件和循环不是。



Don''t you have a C textbook?
"That which is separated by semicolons" can be a lot of things, but in
C, it is usually a statement.
A statement is the minimum unit of executable C code that can be
executed on its own. An expression is anything that has a value.
Some expressions qualify as statements (by adding a semicolon after
them),
but not all statements qualify as expressions. For example,
conditionals and loops don''t.




在术语表达式语句中,表达式和是一个形容词。

表达式语句是一个语句,

,没有语句是表达式。

a = 0是表达式。

;是一个空语句

a = 0;是表达式声明


你不能这样做:

if(a = 0;){}


表达式有类型和可选的副作用。


-

pete



In the term "expression statement", "expression" is an adjective.
An expression statement is a statement,
and no statements are expressions.
a = 0 is an expression.
; is a null statement
a = 0; is an expression statement

You can''t do this:
if (a = 0;){}

Expressions have types and optionally, side effects.

--
pete


Joona I Palaste< pa ***** @ cc.helsinki.fi>写道:
Joona I Palaste <pa*****@cc.helsinki.fi> writes:
表达式是任何有值的东西。
An expression is anything that has a value.




类型`void''的表达式也是一个表达,但没有

a值。


马丁



An expression of type `void'' is also an expression, but doesn''t have
a value.

Martin


这篇关于陈述和表达。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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