An Entity of Type: building, from Named Graph: http://dbpedia.org, within Data Space: dbpedia.org

In programming language theory, the associativity of an operator is a property that determines how operators of the same precedence are grouped in the absence of parentheses. If an operand is both preceded and followed by operators (for example, ^ 3 ^), and those operators have equal precedence, then the operand may be used as input to two different operations (i.e. the two operations indicated by the two operators). The choice of which operations to apply the operand to, is determined by the associativity of the operators. Operators may be associative (meaning the operations can be grouped arbitrarily), left-associative (meaning the operations are grouped from the left), right-associative (meaning the operations are grouped from the right) or non-associative (meaning operations cannot be

Property Value
dbo:abstract
  • Operatorassoziativität bezeichnet vor allem in der Informatik, aber auch Mathematik und Logik die Festlegung, wie komplexere Ausdrücke mit nicht infix-Operatoren, die für Operationen stehen, die nicht unbedingt assoziativ sind, zu lesen sind. Zum Beispiel sind in der Mathematik die Addition und Multiplikation, die üblicherweise mit bzw. notiert werden, assoziative Operationen, es gilt also bzw. , ebenso wie in der Logik die Konjunktion und Disjunktion . Hier ist es gleichgültig, ob als oder als interpretiert wird. Bei nicht assoziativen Operationen, wie etwa der Subtraktion (infix notiert durch „–“), gilt nicht allgemein, und daher muss festgelegt werden, ob Ausdrücke wie überhaupt erlaubt sind, und, falls sie erlaubt sind, welche Klammerung implizit vorliegen soll. Wird festgelegt, dass „–“ linksassoziativ ist, ist wie zu interpretieren. Soll „–“ dagegen rechtsassoziativ sein, wäre wie zu interpretieren. (de)
  • In programming language theory, the associativity of an operator is a property that determines how operators of the same precedence are grouped in the absence of parentheses. If an operand is both preceded and followed by operators (for example, ^ 3 ^), and those operators have equal precedence, then the operand may be used as input to two different operations (i.e. the two operations indicated by the two operators). The choice of which operations to apply the operand to, is determined by the associativity of the operators. Operators may be associative (meaning the operations can be grouped arbitrarily), left-associative (meaning the operations are grouped from the left), right-associative (meaning the operations are grouped from the right) or non-associative (meaning operations cannot be chained, often because the output type is incompatible with the input types). The associativity and precedence of an operator is a part of the definition of the programming language; different programming languages may have different associativity and precedence for the same type of operator. Consider the expression a ~ b ~ c. If the operator ~ has left associativity, this expression would be interpreted as (a ~ b) ~ c. If the operator has right associativity, the expression would be interpreted as a ~ (b ~ c). If the operator is non-associative, the expression might be a syntax error, or it might have some special meaning. Some mathematical operators have inherent associativity. For example, subtraction and division, as used in conventional math notation, are inherently left-associative. Addition and multiplication, by contrast, are both left and right associative. (e.g. (a * b) * c = a * (b * c)). Many programming language manuals provide a table of operator precedence and associativity; see, for example, the table for C and C++. The concept of notational associativity described here is related to, but different from, the mathematical associativity. An operation that is mathematically associative, by definition requires no notational associativity. (For example, addition has the associative property, therefore it does not have to be either left associative or right associative.) An operation that is not mathematically associative, however, must be notationally left-, right-, or non-associative. (For example, subtraction does not have the associative property, therefore it must have notational associativity.) (en)
  • Em Linguagens de programação e Notação matemática, a associatividade de um operador é uma propriedade que determina como operadores de mesma precedência são agrupados na ausência de parêntesis. Operadores podem ser associativos-à-esquerda, associativos-à-direita ou não-associativos. A associatividade e a precedência de um operador depende da linguagem de programação em questão. Considere a expressão a ~ b ~ c. Se o operador ~ tem associatividade à esquerda, essa expressão seria interpretada como (a ~ b) ~ c e avaliada da esquerda para a direita. Se o operador tem associatividade à direita, a expressão seria interpretada como a ~ (b ~ c) e avaliada da direita para a esquerda. Se o operador não é associativo, a expressão pode resultar em um erro de sintaxe, como no caso do operador de exponenciação ** da linguagem de programação Ada, ou pode ter algum significado especial. Muitos manuais de linguagem de programação fornecem uma tabela de precedência dos operadores e associatividade, ver, por exemplo, tabela de C e C ++. (pt)
  • Очерёдность операций в программировании — установленная синтаксисом конкретного языка программирования последовательность выполнения операций (или направление вычисления), реализуемая когда операции имеют одинаковый приоритет и отсутствует явное (с помощью скобок) указание на очерёдность их выполнения. Ассоциативность (от лат. associatio) — свойство операций, позволяющее восстановить последовательность их выполнения при отсутствии явных указаний на очерёдность при равном приоритете; при этом различается левая ассоциативность, при которой вычисление выражения происходит слева направо, и правая ассоциативность — справа налево. Соответствующие операторы называют левоассоциативными и правоассоциативными. Например, в языке Python большинство операций имеет левую ассоциативность, в то время как возведение в степень правоассоциативно: Правая ассоциативность (вычисление выражения справа налево), возведение в степень в языке Python: x ** y ** z == x ** (y ** z)2 ** 2 ** 3 == 2 ** (2 ** 3) == 256(2 ** 2) ** 3 == 64 Левая ассоциативность (вычисление выражения слева направо), побитовый сдвиг в языке Python: x << y << z == (x << y) << z2 << 2 << 3 == (2 << 2) << 3 == 642 << (2 << 3) == 2 << 16 == 131072 В C# все бинарные операции, кроме присваивания имеют левую ассоциативность: 8 / 4 / 2 == ( 8 / 4 ) / 2 (ru)
dbo:wikiPageID
  • 459474 (xsd:integer)
dbo:wikiPageLength
  • 12120 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID
  • 1118107255 (xsd:integer)
dbo:wikiPageWikiLink
dbp:wikiPageUsesTemplate
dcterms:subject
gold:hypernym
rdf:type
rdfs:comment
  • Operatorassoziativität bezeichnet vor allem in der Informatik, aber auch Mathematik und Logik die Festlegung, wie komplexere Ausdrücke mit nicht infix-Operatoren, die für Operationen stehen, die nicht unbedingt assoziativ sind, zu lesen sind. Zum Beispiel sind in der Mathematik die Addition und Multiplikation, die üblicherweise mit bzw. notiert werden, assoziative Operationen, es gilt also bzw. , ebenso wie in der Logik die Konjunktion und Disjunktion . Hier ist es gleichgültig, ob als oder als interpretiert wird. (de)
  • In programming language theory, the associativity of an operator is a property that determines how operators of the same precedence are grouped in the absence of parentheses. If an operand is both preceded and followed by operators (for example, ^ 3 ^), and those operators have equal precedence, then the operand may be used as input to two different operations (i.e. the two operations indicated by the two operators). The choice of which operations to apply the operand to, is determined by the associativity of the operators. Operators may be associative (meaning the operations can be grouped arbitrarily), left-associative (meaning the operations are grouped from the left), right-associative (meaning the operations are grouped from the right) or non-associative (meaning operations cannot be (en)
  • Очерёдность операций в программировании — установленная синтаксисом конкретного языка программирования последовательность выполнения операций (или направление вычисления), реализуемая когда операции имеют одинаковый приоритет и отсутствует явное (с помощью скобок) указание на очерёдность их выполнения. Ассоциативность (от лат. associatio) — свойство операций, позволяющее восстановить последовательность их выполнения при отсутствии явных указаний на очерёдность при равном приоритете; при этом различается левая ассоциативность, при которой вычисление выражения происходит слева направо, и правая ассоциативность — справа налево. Соответствующие операторы называют левоассоциативными и правоассоциативными. (ru)
  • Em Linguagens de programação e Notação matemática, a associatividade de um operador é uma propriedade que determina como operadores de mesma precedência são agrupados na ausência de parêntesis. Operadores podem ser associativos-à-esquerda, associativos-à-direita ou não-associativos. A associatividade e a precedência de um operador depende da linguagem de programação em questão. Muitos manuais de linguagem de programação fornecem uma tabela de precedência dos operadores e associatividade, ver, por exemplo, tabela de C e C ++. (pt)
rdfs:label
  • Operatorassoziativität (de)
  • Operator associativity (en)
  • Associatividade de operadores (pt)
  • Очерёдность операций (ru)
owl:sameAs
prov:wasDerivedFrom
foaf:isPrimaryTopicOf
is dbo:wikiPageRedirects of
is dbo:wikiPageWikiLink of
is foaf:primaryTopic of
Powered by OpenLink Virtuoso    This material is Open Knowledge     W3C Semantic Web Technology     This material is Open Knowledge    Valid XHTML + RDFa
This content was extracted from Wikipedia and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License