So even though we think of conditions as being Boolean values true or false, really underneath the hood true means anything other than zero.
即使我们考虑,布尔值的真假条件,在底层“真“表示非零。
There's this notion of a Boolean value named after Mr. Bool, which is just a notion of true or false.
布尔值的概念是在布尔先生之后命名的,它是一个正确或错误的概念。
PROFESSOR2: So it's not really a Boolean-valued function.
教授2:因此这并不是一个,真正的布尔值的函数。
And now, if I'm touching mouse pointer, we saw that Boolean expression before, play sound meow, wait a couple of seconds, and then just keep checking.
现在,如果我们碰下鼠标指针,起初我们看到一个布尔表达式,播放猫叫的声音,等几秒钟,然后如刚才那样做检测。
And this puzzle piece here colored in blue because it's a Boolean expression is just something that--whose answer is either a yes or no, 0 true or false, one or zero.
这个拼图染成蓝色,因为它是布尔表达式,它的结果只可能是肯定或否定,对或错,1或者。
Scratch This Boolean expression allows you to say to scratch if you are touching the mouse pointer, the little arrow, do something. How do we do something?
布尔表达式允许你告诉,当你触碰到鼠标指针,也就是小箭头,程序就相应地做一些事情?
You've got a loop, you've got a condition and a boolean to check if he's touching the edge, and some statements to tell him to shout or to actually turn around.
我们有一个循环,通过一个条件和一个布尔值来判断,是否触到了边缘,还有一些语句,让它回头并咆哮。
Something that takes two inputs, a left operant - and a right operant and it just returns a Boolean value is-- or rather it returns a left to right value.
它有两个输入,一个是左边的作用物,一个是右边的作用物,然后返回一个布尔值-,或者更确切地说,返回一个从左到右的值。
Turns out with a Boolean expression, you don't have use the equality operator equals equals, you can just say what you mean.
结果用一个bool表达式,你不需要使用等号操作符“==“了,你只要说出你的意思。
It's a little more readable because I'm using a Boolean value that tells me, the programmer, this is true or this is false.
它更具有可读性一点,因为我使用了一个bool值,它告诉我或程序员,这是正确的或这是错误的。
So we talked about Mr. Bool briefly last week in this idea of true or false, but in C, you don't have a Boolean data type.
我们上周简短地谈论过Bool先生的,真假的逻辑思想,但是在C语言里,没有布尔数据类型。
That's what's called a Boolean expression named after literally a man named Boole.
这就是以Boolean这个人,的名字命名的布尔表达式。
I'm expecting the value that test to be a Boolean. Followed by a colon.
我希望测试的结果值的类型,是Boolean的,后面是个冒号。
Scratch The syntax actually looks reminiscent to Scratch, where you have a puzzle piece reminiscent of this shape, but you have to say "if" followed by a space, followed by in parenthesis, the Boolean expression that you want to check -- more on those in a moment.
这个语法看起来使人想起,那里有一个这种形状的程序块,但是你必须说明“if“后面跟着一个空格,跟着一个括号,一个你需要核对的布尔表达式,-还有更多的。
应用推荐