sql定义布尔类型变量
[rps-include post=6522]
[rps-include post = 6522]
Programming generally consist of numeric and logic operations. We have seen numeric variables in previous post. Now we will look other part. While developing applications we generally provide algorithm. Algorithms mostly provides execution diagram. We will use logic values to check and change the execution of the application.
编程通常包括数字和逻辑运算。 我们已经在上一篇文章中看到了数字变量。 现在,我们将看另一部分。 在开发应用程序时,我们通常提供算法。 算法主要提供执行图。 我们将使用逻辑值来检查和更改应用程序的执行。
布尔型 (Boolean)
Boolean logic uses true
and false
as values and makes some calculations with operators. We will see these calculations and operators next chapters.
布尔逻辑使用true
和false
作为值,并使用运算符进行一些计算。 我们将在下一章中看到这些计算和运算符。
真正 (True)
true
is used to describe the positive and true situation. Positive numbers generally interpreted as true
in most situations by the functions or third party libraries. In the example below we will create a boolean variable which is named $door_isopen
and holds the door openness situation.
true
用于描述正面和真实的情况。 函数或第三方库通常在大多数情况下将正数解释为true
。 在下面的示例中,我们将创建一个名为$door_isopen
的布尔变量,该变量保存门的打开情况。
$door_isopen=true;