请输入您要查询的百科知识:

 

词条 Infix notation
释义

  1. Usage

  2. Order of operations

  3. Further notations

  4. See also

  5. References

  6. External links

{{Operator notation sidebar |logo=}}

Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands—"infixed operators"—such as the plus sign in 2 + 2.

Usage

Infix notation is more difficult to parse by computers than prefix notation (e.g. + 2 2) or postfix notation (e.g. 2 2 +). However many programming languages use it due to its familiarity. It is more used in arithmetic, e.g. 5 × 6.[1]

Order of operations

In infix notation, unlike in prefix or postfix notations, parentheses surrounding groups of operands and operators are necessary to indicate the intended order in which operations are to be performed. In the absence of parentheses, certain precedence rules determine the order of operations.

Further notations

Infix notation may also be distinguished from function notation, where the name of a function suggests a particular operation, and its arguments are the operands. An example of such a function notation would be S(1, 3) in which the function S denotes addition: S(1, 3) = 1 + 3 = 4.

See also

  • Tree traversal: Infix (In-order) is also a tree traversal order. It is described in a more detailed manner on this page.
  • Calculator input methods: comparison of notations as used by pocket calculators
  • Postfix notation, also called Reverse Polish notation
  • Prefix notation, also called Polish notation
  • Shunting yard algorithm, used to convert infix notation to postfix notation or to a tree
  • Operator (computer programming)

References

1. ^{{cite web | url=http://www.cs.man.ac.uk/~pjj/cs212/fix.html | title=The Implementation and Power of Programming Languages | accessdate=30 August 2014}}

External links

  • RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic
  • Infix to postfix convertor[sic]

2 : Mathematical notation|Operators (programming)

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/16 17:24:35