figshare
Browse

(5) Operator precedence and associativity symbols by computer language.pdf

Download (503.65 kB)
figure
posted on 2023-04-08, 19:03 authored by Paul A. GagniucPaul A. Gagniuc

Operator precedence and associativity symbols by computer language. In this table, operators enclosed in the same border have equal precedence and their associativity is shown on the column next to the symbols. The pink color of a cell indicates a group of operators and the light yellowish color indicates single operators per level. Note that the abbreviation OP means Order of Precedence; A = Associativity; N = Order of direction is not applicable here - non-associative; L = left-to-right; R = right-to-left. Some lesser known and used operator symbols are not shown here. The plus and minus signs belonging to addition and subtraction can be seen immediately below multiplication and division. Other plus or minus symbols present either above or below that position have dual roles, such as the plus sign in JavaScript which uses the symbol for both concatenation and addition. Other interesting observations are: In VB the "\" means integer division; in Ruby "=~" means matching operator; also in Ruby "!~" means NOT match. In C# the "^" means bitwise XOR, whereas in VB it means exponentiation.

 

  • Paul A. Gagniuc. An Introduction to Programming Languages: Simultaneous Learning in Multiple Coding Environments. Synthesis Lectures on Computer Science. Springer International Publishing, 2023, pp. 1-280.

History

Usage metrics

    Licence

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC