memrootじしょ
英和翻訳
comparison operator
comparison operator
[kəmˌpærɪsn ˈɒpəreɪtər]
コンパリソン オペレーター
1.
二つの値の関係性(等しい、より大きい、より小さいなど)を評価するための記号や構文。
プログラミング言語やデータベースのクエリ、数学的な論理式などで用いられ、複数の値や変数間の比較を行い、その結果を真偽値(True/False)で返します。
In
Python,
`>`
is
a
comparison
operator
used
to
check
if
the
left
operand
is
greater
than
the
right.
(Pythonでは、`>` は左のオペランドが右より大きいかをチェックする比較演算子です。)
In Python
Pythonにおいて
>
`>`という記号は
is a comparison operator
比較演算子である
used to check
チェックするために使われる
if the left operand
左のオペランドが
is greater than the right
右より大きいか
Many
programming
languages
use
`==`
for
equality
comparison
and
`=`
for
assignment.
(多くのプログラミング言語では、`==` を等値比較に、`=` を代入に使用します。)
Many programming languages
多くのプログラミング言語が
use `==`
`==`を使用する
for equality comparison
等値比較のために
and `=`
そして`=`を
for assignment
代入のために
If
`x`
is
less
than
or
equal
to
`y`,
the
expression
`x
<=
y`
evaluates
to
true.
(もし `x` が `y` 以下であれば、式 `x <= y` は真と評価されます。)
If `x`
もし`x`が
is less than or equal to `y`
`y`以下であるなら
the expression
その式
`x <= y`
`x <= y`は
evaluates to true
真と評価される
2.
プログラムの条件分岐やループ処理において、特定の条件が満たされているかどうかを判断するために利用される演算子。
`if`文や`while`ループなどの制御構造内で使われ、条件式の評価結果に基づいて、次に実行すべきコードブロックを決定します。これにより、プログラムの動的な挙動を実現します。
An
`if`
statement
uses
a
comparison
operator
to
decide
whether
to
execute
a
block
of
code.
(`if` 文は、コードブロックを実行するかどうかを決定するために比較演算子を使用します。)
An `if` statement
`if`文は
uses
使用する
a comparison operator
比較演算子を
to decide
決定するために
whether to execute
実行するかどうか
a block of code
コードのブロックを
The
`while`
loop
continues
as
long
as
the
condition
involving
a
comparison
operator
is
true.
(`while` ループは、比較演算子を含む条件が真である限り続行します。)
The `while` loop
`while` ループは
continues
続行する
as long as
である限り
the condition
その条件が
involving a comparison operator
比較演算子を含む
is true
真である
Incorrect
use
of
comparison
operators
can
lead
to
logic
errors
in
your
program.
(比較演算子の誤った使用は、プログラムの論理エラーにつながる可能性があります。)
Incorrect use
誤った使用は
of comparison operators
比較演算子の
can lead to
~につながる可能性がある
logic errors
論理エラーに
in your program
あなたのプログラム内で
関連
Logical operator
Arithmetic operator
Assignment operator
Relational operator
Boolean operator