1*01869ca4Swiz.\" $NetBSD: operator.7,v 1.12 2017/07/03 21:30:59 wiz Exp $ 2294d9cc7Sjtc.\" 3294d9cc7Sjtc.\" Copyright (c) 1989, 1990, 1993 4294d9cc7Sjtc.\" The Regents of the University of California. All rights reserved. 561f28255Scgd.\" 661f28255Scgd.\" Redistribution and use in source and binary forms, with or without 761f28255Scgd.\" modification, are permitted provided that the following conditions 861f28255Scgd.\" are met: 961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 1061f28255Scgd.\" notice, this list of conditions and the following disclaimer. 1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1261f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1361f28255Scgd.\" documentation and/or other materials provided with the distribution. 14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 1561f28255Scgd.\" may be used to endorse or promote products derived from this software 1661f28255Scgd.\" without specific prior written permission. 1761f28255Scgd.\" 1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2161f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2861f28255Scgd.\" SUCH DAMAGE. 2961f28255Scgd.\" 30294d9cc7Sjtc.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 3161f28255Scgd.\" 32bcf6a6c0Suwe.Dd January 18, 2011 3361f28255Scgd.Dt OPERATOR 7 3461f28255Scgd.Os 3561f28255Scgd.Sh NAME 3661f28255Scgd.Nm operator 37bcf6a6c0Suwe.Nd C and C++ operator precedence and associativity 3861f28255Scgd.Sh DESCRIPTION 39bcf6a6c0Suwe.Bl -column -offset indent \ 40*01869ca4Swiz ".Li \&! ~ ++ \-\- \- (type) * & sizeof new delete" \ 41bcf6a6c0Suwe ".Sy Associativity" 42bcf6a6c0Suwe.\" 43bcf6a6c0Suwe.It Sy Operator \ 44bcf6a6c0Suwe Ta Sy Associativity 45bcf6a6c0Suwe.\" 46bcf6a6c0Suwe.\" XXX: For some reason if anything but tab follows the last dot 47bcf6a6c0Suwe.\" XXX: the space before it is lost and we get ->. in the output. 48bcf6a6c0Suwe.\" XXX: My troff fu is weak, just work around with explicit \<space>. 49*01869ca4Swiz.It Li \&() [] \->\ \. \ 50bcf6a6c0Suwe Ta left to right 51bcf6a6c0Suwe.\" 52*01869ca4Swiz.It Li \&! ~ ++ \-\- \- (type) * & sizeof new delete \ 53bcf6a6c0Suwe Ta right to left 54bcf6a6c0Suwe.\" 55*01869ca4Swiz.It Li \&\->* .* \ 56bcf6a6c0Suwe Ta left to right 57bcf6a6c0Suwe.\" 58bcf6a6c0Suwe.It Li \&* / % \ 59bcf6a6c0Suwe Ta left to right 60bcf6a6c0Suwe.\" 61bcf6a6c0Suwe.It Li \&+ \- \ 62bcf6a6c0Suwe Ta left to right 63bcf6a6c0Suwe.\" 64*01869ca4Swiz.It Li \&<< >> \ 65bcf6a6c0Suwe Ta left to right 66bcf6a6c0Suwe.\" 67*01869ca4Swiz.It Li \&< <= > >= \ 68bcf6a6c0Suwe Ta left to right 69bcf6a6c0Suwe.\" 70bcf6a6c0Suwe.It Li \&== != \ 71bcf6a6c0Suwe Ta left to right 72bcf6a6c0Suwe.\" 73*01869ca4Swiz.It Li \&& \ 74bcf6a6c0Suwe Ta left to right 75bcf6a6c0Suwe.\" 76bcf6a6c0Suwe.It Li \&^ \ 77bcf6a6c0Suwe Ta left to right 78bcf6a6c0Suwe.\" 79bcf6a6c0Suwe.It Li \&| \ 80bcf6a6c0Suwe Ta left to right 81bcf6a6c0Suwe.\" 82*01869ca4Swiz.It Li \&&& \ 83bcf6a6c0Suwe Ta left to right 84bcf6a6c0Suwe.\" 85bcf6a6c0Suwe.It Li \&|| \ 86bcf6a6c0Suwe Ta left to right 87bcf6a6c0Suwe.\" 88bcf6a6c0Suwe.It Li \&?: \ 89bcf6a6c0Suwe Ta right to left 90bcf6a6c0Suwe.\" 91*01869ca4Swiz.It Li \&= += \-= *= /= %= <<= >>= &= ^= |= throw \ 92bcf6a6c0Suwe Ta right to left 93bcf6a6c0Suwe.\" 94bcf6a6c0Suwe.It Li \&?: No (C++, third operand)\ 95bcf6a6c0Suwe Ta right to left 96bcf6a6c0Suwe.\" 97bcf6a6c0Suwe.It Li \&, \ 98bcf6a6c0Suwe Ta left to right 99bcf6a6c0Suwe.\" 100bcf6a6c0Suwe.El 101bcf6a6c0Suwe.Sh FILES 102bcf6a6c0Suwe.Bl -tag -width ".Pa /usr/share/misc/operator" -compact 103bcf6a6c0Suwe.It Pa /usr/share/misc/operator 10461f28255Scgd.El 105c4245e67Swiz.Sh SEE ALSO 106c4245e67Swiz.Xr iso646 3 107