タグ

control-flowとconditionalに関するnabinnoのブックマーク (7)

  • 関係演算子 - Wikipedia

    計算機科学において、関係演算子(かんけいえんざんし、英: relational operator)または比較演算子(ひかくえんざんし、英: comparison operator)とは、プログラミング言語の演算子で、2つの対象の関係を調べるものをいう。たとえば、同値関係を調べる等号( の )や、順序関係を調べる不等号( の )などが含まれる。 JavaやC#など、独立したブーリアン型を型システムに持つ言語では、関係演算子は2つのオペランドの間に演算子が表す関係が成り立つかどうかによって真 (true) または偽 (false) を返す。一方で、C言語などのブーリアン型を持たない初期の言語では、関係演算子は整数 0(偽を意味する)または 1(真を意味する)を返す。 関係演算子を含む式は、関係式 (relational expression) または条件 (condition) と呼ばれる。ま

  • 条件演算子 - Wikipedia

    条件演算子(じょうけんえんざんし、英: conditional operator)は、プログラミング言語の演算子で、条件文と同様な意味があるが、文ではなく値を持つ式になる。評価されると、条件式の値により異なる式が評価され、異なる値になる。 なお、C言語やC++など一部のプログラミング言語において、条件演算子とは後述する「? :」(ハテナマークとコロン) の演算子の名称である。 「If 〜 Then 〜 Else 〜」にあたる三項演算子があり、ほぼ唯一の、プログラミング言語において一般的な三項演算子である。また「If 〜 Then 〜 if」にあたる二項演算子もある。 三項演算子は、条件式・真式・偽式の3つのオペランドを結ぶ。二項演算子の場合は、条件式と、真式または偽式のいずれかの、2つのオペランドを結ぶ。 条件文との違いは、 真式・偽式は式(条件文における節のように文を置くことができない)

  • 逆引きRuby – www.namaraii.com – Index of TAKEUCHI, Hitoshi

    逆引きRubyRubyを使ってやりたい事から、その方法を調べられる逆引きのリファレンスです。 逆引きRubyはもともとWikiで運用していました。このため、サイトのコンテンツは私以外の多くの方によって作成・編集されたものです。 2017年に静的HTML(jekyll)の管理へ移行しましたが、2018年10月からScrapboxへ移行しました。どなたでも編集いただけますので、ご協力いただける方はよろしくお願いします。 逆引きRuby (https://scrapbox.io/rubytips/逆引きRuby)

  • Conditional (computer programming) - Wikipedia

    If-then-else flow diagram A nested if–then–else flow diagram In computer science, conditionals (that is, conditional statements, conditional expressions and conditional constructs) are programming language commands for handling decisions. Specifically, conditionals perform different computations or actions depending on whether a programmer-defined Boolean condition evaluates to true or false. In t

    Conditional (computer programming) - Wikipedia
  • Ternary conditional operator - Wikipedia

    "?:" redirects here. For use as a binary operator, see Elvis operator. In computer programming, the ternary conditional operator is a ternary operator that is part of the syntax for basic conditional expressions in several programming languages. It is commonly referred to as the conditional operator, ternary if, or inline if (abbreviated iif). An expression a ? b : c evaluates to b if the value of

  • Ternary operation - Wikipedia, the free encyclopedia

    In mathematics, a ternary operation is an n-ary operation with n = 3. A ternary operation on a set A takes any given three elements of A and combines them to form a single element of A. In computer science, a ternary operator is an operator that takes three arguments as input and returns one output.[1] Given A, B and point P, geometric construction yields V, the projective harmonic conjugate of P

  • if文 - Wikipedia

    この記事には複数の問題があります。改善やノートページでの議論にご協力ください。 出典がまったく示されていないか不十分です。内容に関する文献や情報源が必要です。(2024年2月) 独自研究が含まれているおそれがあります。(2024年2月) 出典検索?: "If文" – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL if文(イフぶん、英: if statement)は、プログラミング言語において、真理値に従って「もし条件Cが満たされるならば、Xを実行せよ」というような条件付き実行の「文」で、制御構造のひとつである。一般的にif文は「もし条件Cが満たされるならば、Xを実行せよ、さもなくばYを実行せよ」というように条件が満たされなかった場合の分岐もオプション(省略可能)として同時にサポートすることが多く、if-

  • 1