Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af93c4c

Browse files
committed
Added a missing "|" in the grammar productions used in the reference manual
(reported by François Pinard). Added some missing "_" characters in the same cluster of productions. Added missing floor division operator in m_expr production, and mention floor division in the relevant portion of the text.
1 parent 67d687a commit af93c4c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

Doc/ref/ref5.tex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,12 @@ \section{Binary arithmetic operations\label{binary}}
648648
\begin{productionlist}
649649
\production{m_expr}
650650
{\token{u_expr} | \token{m_expr} "*" \token{u_expr}
651+
| \token{m_expr} "//" \token{u_expr}
651652
| \token{m_expr} "/" \token{u_expr}}
652653
\productioncont{| \token{m_expr} "\%" \token{u_expr}}
653654
\production{a_expr}
654-
{\token{m_expr} | \token{aexpr} "+" \token{m_expr}
655-
\token{aexpr} "-" \token{m_expr}}
655+
{\token{m_expr} | \token{a_expr} "+" \token{m_expr}
656+
| \token{a_expr} "-" \token{m_expr}}
656657
\end{productionlist}
657658
658659
The \code{*} (multiplication) operator yields the product of its
@@ -663,11 +664,12 @@ \section{Binary arithmetic operations\label{binary}}
663664
performed; a negative repetition factor yields an empty sequence.
664665
\index{multiplication}
665666
666-
The \code{/} (division) operator yields the quotient of its
667-
arguments. The numeric arguments are first converted to a common
668-
type. Plain or long integer division yields an integer of the same
669-
type; the result is that of mathematical division with the `floor'
670-
function applied to the result. Division by zero raises the
667+
The \code{/} (division) and \code{//} (floor division) operators yield
668+
the quotient of their arguments. The numeric arguments are first
669+
converted to a common type. Plain or long integer division yields an
670+
integer of the same type; the result is that of mathematical division
671+
with the `floor' function applied to the result. Division by zero
672+
raises the
671673
\exception{ZeroDivisionError} exception.
672674
\exindex{ZeroDivisionError}
673675
\index{division}

0 commit comments

Comments
 (0)