2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright (c) 1989, 1990, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
2013-03-10 16:43:17 +00:00
|
|
|
.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
accept.2, bind.2, connect.2, getpeername.2, getpriority.2, getsockname.2, getsockopt.2, ioctl.2, killpg.2, listen.2, lseek.2, readlink.2, recv.2, send.2, setpgid.2, setreuid.2, shutdown.2, socket.2, socketpair.2, syscall.2, truncate.2, alloca.3, btree.3, daemon.3, dbopen.3, err.3, exec.3, fclose.3, ferror.3, fflush.3, fopen.3, fread.3, fseek.3, fts.3, getloadavg.3, hash.3, mpool.3, openpty.3, popen.3, queue.3, rcmd.3, recno.3, rexec.3, scanf.3, setbuf.3, stdarg.3, stdio.3, strtod.3, hostname.7, mdoc.7, mdoc.samples.7, operator.7, symlink.7: Add LICENSE_START(BSD_[34]_CLAUSE_FULL)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:48 +00:00
|
|
|
.\" %%%LICENSE_END
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
|
|
|
.\" @(#)operator.7 8.1 (Berkeley) 6/9/93
|
|
|
|
.\"
|
|
|
|
.\" Copied shamelessly from FreeBSD with minor changes. 2003-05-21
|
|
|
|
.\" Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
|
|
|
|
.\"
|
|
|
|
.\" Restored automatic formatting from FreeBSD. 2003-08-24
|
|
|
|
.\" Martin Schulze <joey@infodrom.org>
|
|
|
|
.\"
|
2007-12-03 19:59:38 +00:00
|
|
|
.\" 2007-12-08, mtk, Converted from mdoc to man macros
|
2007-12-03 19:53:53 +00:00
|
|
|
.\"
|
2011-09-10 01:50:17 +00:00
|
|
|
.TH OPERATOR 7 2011-09-09 "Linux" "Linux Programmer's Manual"
|
2007-12-03 19:53:53 +00:00
|
|
|
.SH NAME
|
2011-09-10 01:50:17 +00:00
|
|
|
operator \- C operator precedence and order of evaluation
|
2007-12-03 19:53:53 +00:00
|
|
|
.SH DESCRIPTION
|
2004-11-03 13:51:07 +00:00
|
|
|
This manual page lists C operators and their precedence in evaluation.
|
2007-12-03 19:53:53 +00:00
|
|
|
.nf
|
|
|
|
|
|
|
|
.B "Operator Associativity"
|
2007-12-22 16:40:46 +00:00
|
|
|
() [] \-> . left to right
|
|
|
|
! ~ ++ \-\- + \- (type) * & sizeof right to left
|
2007-12-03 19:53:53 +00:00
|
|
|
* / % left to right
|
2007-12-22 16:40:46 +00:00
|
|
|
+ \- left to right
|
2007-12-03 19:53:53 +00:00
|
|
|
<< >> left to right
|
|
|
|
< <= > >= left to right
|
|
|
|
== != left to right
|
|
|
|
& left to right
|
|
|
|
^ left to right
|
|
|
|
| left to right
|
|
|
|
&& left to right
|
|
|
|
|| left to right
|
|
|
|
?: right to left
|
2007-12-22 16:40:46 +00:00
|
|
|
= += \-= *= /= %= <<= >>= &= ^= |= right to left
|
2007-12-03 19:53:53 +00:00
|
|
|
, left to right
|
|
|
|
.fi
|
2004-11-22 16:48:40 +00:00
|
|
|
.\"
|