version 1.10, 2011/01/17 11:19:07 |
version 1.11, 2011/01/18 23:36:07 |
|
|
.\" |
.\" |
.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 |
.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 |
.\" |
.\" |
.Dd January 17, 2011 |
.Dd January 18, 2011 |
.Dt OPERATOR 7 |
.Dt OPERATOR 7 |
.Os |
.Os |
.Sh NAME |
.Sh NAME |
.Nm operator |
.Nm operator |
.Nd C operator precedence and associativity |
.Nd C and C++ operator precedence and associativity |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Bl -column \ |
.Bl -column -offset indent \ |
"! ~ ++ -- - (type) * \*[Am] sizeof" "Associativity" -offset indent |
".Li \&! ~ ++ \-\- \- (type) * \*[Am] sizeof new delete" \ |
.It Sy Operator Associativity |
".Sy Associativity" |
.It \&() [] -\*[Gt] . left to right |
.\" |
.It "! ~ ++ -- - (type) * \*[Am] sizeof" right to left |
.It Sy Operator \ |
.It \&* / % left to right |
Ta Sy Associativity |
.It \&+ - left to right |
.\" |
.It \&\*[Lt]\*[Lt] \*[Gt]\*[Gt] left to right |
.\" XXX: For some reason if anything but tab follows the last dot |
.It \&\*[Lt] \*[Le] \*[Gt] \*[Ge] left to right |
.\" XXX: the space before it is lost and we get ->. in the output. |
.It \&== != left to right |
.\" XXX: My troff fu is weak, just work around with explicit \<space>. |
.It \&\*[Am] left to right |
.It Li \&() [] \-\*[Gt]\ \. \ |
.It \&^ left to right |
Ta left to right |
.It \&| left to right |
.\" |
.It \&\*[Am]\*[Am] left to right |
.It Li \&! ~ ++ \-\- \- (type) * \*[Am] sizeof new delete \ |
.It \&|| left to right |
Ta right to left |
.It \&?: right to left |
.\" |
.It \&= += -= etc. right to left |
.It Li \&\-\*[Gt]* .* \ |
.It \&, left to right |
Ta left to right |
|
.\" |
|
.It Li \&* / % \ |
|
Ta left to right |
|
.\" |
|
.It Li \&+ \- \ |
|
Ta left to right |
|
.\" |
|
.It Li \&\*[Lt]\*[Lt] \*[Gt]\*[Gt] \ |
|
Ta left to right |
|
.\" |
|
.It Li \&\*[Lt] \*[Lt]= \*[Gt] \*[Gt]= \ |
|
Ta left to right |
|
.\" |
|
.It Li \&== != \ |
|
Ta left to right |
|
.\" |
|
.It Li \&\*[Am] \ |
|
Ta left to right |
|
.\" |
|
.It Li \&^ \ |
|
Ta left to right |
|
.\" |
|
.It Li \&| \ |
|
Ta left to right |
|
.\" |
|
.It Li \&\*[Am]\*[Am] \ |
|
Ta left to right |
|
.\" |
|
.It Li \&|| \ |
|
Ta left to right |
|
.\" |
|
.It Li \&?: \ |
|
Ta right to left |
|
.\" |
|
.It Li \&= += \-= *= /= %= \*[Lt]\*[Lt]= \*[Gt]\*[Gt]= \*[Am]= ^= |= throw \ |
|
Ta right to left |
|
.\" |
|
.It Li \&?: No (C++, third operand)\ |
|
Ta right to left |
|
.\" |
|
.It Li \&, \ |
|
Ta left to right |
|
.\" |
|
.El |
|
.Sh FILES |
|
.Bl -tag -width ".Pa /usr/share/misc/operator" -compact |
|
.It Pa /usr/share/misc/operator |
.El |
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr iso646 3 |
.Xr iso646 3 |