OLD | NEW |
1 \documentclass{article} | 1 \documentclass{article} |
2 \usepackage{epsfig} | 2 \usepackage{epsfig} |
3 \usepackage{color} | 3 \usepackage{color} |
4 \usepackage{dart} | 4 \usepackage{dart} |
5 \usepackage{bnf} | 5 \usepackage{bnf} |
6 \usepackage{hyperref} | 6 \usepackage{hyperref} |
7 \usepackage{lmodern} | 7 \usepackage{lmodern} |
8 \newcommand{\code}[1]{{\sf #1}} | 8 \newcommand{\code}[1]{{\sf #1}} |
9 \title{Dart Programming Language Specification \\ | 9 \title{Dart Programming Language Specification \\ |
10 {\large Version 1.9}} | 10 {\large Version 1.9}} |
(...skipping 4271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4282 | 4282 |
4283 \LMHash{} | 4283 \LMHash{} |
4284 An {\em equality expression} is either a relational expression (\ref{relationalE
xpressions}), or an invocation of an equality operator on either \SUPER{} or an
expression $e_1$, with argument $e_2$. | 4284 An {\em equality expression} is either a relational expression (\ref{relationalE
xpressions}), or an invocation of an equality operator on either \SUPER{} or an
expression $e_1$, with argument $e_2$. |
4285 | 4285 |
4286 | 4286 |
4287 \LMHash{} | 4287 \LMHash{} |
4288 Evaluation of an equality expression $ee$ of the form \code{$e_1$ == $e_2$} proc
eeds as follows: | 4288 Evaluation of an equality expression $ee$ of the form \code{$e_1$ == $e_2$} proc
eeds as follows: |
4289 \begin{itemize} | 4289 \begin{itemize} |
4290 \item The expression $e_1$ is evaluated to an object $o_1$. | 4290 \item The expression $e_1$ is evaluated to an object $o_1$. |
4291 \item The expression $e_2$ is evaluated to an object $o_2$. | 4291 \item The expression $e_2$ is evaluated to an object $o_2$. |
4292 \item If either $o_1$ or $o_2$ is \NULL{}, then $ee$ evaluates to \code{identica
l($o_1$, $o_2$)}. Otherwise, | 4292 \item If either $o_1$ or $o_2$ is \NULL{}, then $ee$ evaluates to \TRUE{} if bot
h $o_1$ and $o_2$ are \NULL{} and to \FALSE{} otherwise. Otherwise, |
4293 \item $ee$ is equivalent to the method invocation \code{$o_1$.==($o_2$)}. | 4293 \item $ee$ is equivalent to the method invocation \code{$o_1$.==($o_2$)}. |
4294 \end{itemize} | 4294 \end{itemize} |
4295 | 4295 |
4296 | 4296 |
4297 \LMHash{} | 4297 \LMHash{} |
4298 Evaluation of an equality expression $ee$ of the form \code{\SUPER{} == $e$} pro
ceeds as follows: | 4298 Evaluation of an equality expression $ee$ of the form \code{\SUPER{} == $e$} pro
ceeds as follows: |
4299 \begin{itemize} | 4299 \begin{itemize} |
4300 \item The expression $e$ is evaluated to an object $o$. | 4300 \item The expression $e$ is evaluated to an object $o$. |
4301 \item If either \THIS{} or $o$ is \NULL{}, then $ee$ evaluates to \code{identica
l(\THIS{}, $o$)}. Otherwise, | 4301 \item If either \THIS{} or $o$ is \NULL{}, then $ee$ evaluates to evaluates to \
TRUE{} if both \THIS{} and $o$ are \NULL{} and to \FALSE{} otherwise. Otherwise, |
4302 \item $ee$ is equivalent to the method invocation \code{\SUPER{}.==($o$)}. | 4302 \item $ee$ is equivalent to the method invocation \code{\SUPER{}.==($o$)}. |
4303 \end{itemize} | 4303 \end{itemize} |
4304 | 4304 |
4305 \commentary{As a result of the above definition, user defined \code{==} methods
can assume that their argument is non-null, and avoid the standard boiler-plate
prelude: | 4305 \commentary{As a result of the above definition, user defined \code{==} methods
can assume that their argument is non-null, and avoid the standard boiler-plate
prelude: |
4306 | 4306 |
4307 \code{if (identical(\NULL{}, arg)) return \FALSE{};} | 4307 \code{if (identical(\NULL{}, arg)) return \FALSE{};} |
4308 | 4308 |
4309 Another implication is that there is never a need to use \code{identical()} to t
est against \NULL{}, nor should anyone ever worry about whether to write \NULL{}
== $e$ or $e$ == \NULL{}. | 4309 Another implication is that there is never a need to use \code{identical()} to t
est against \NULL{}, nor should anyone ever worry about whether to write \NULL{}
== $e$ or $e$ == \NULL{}. |
4310 } | 4310 } |
4311 | 4311 |
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7337 | 7337 |
7338 The invariant that each normative paragraph is associated with a line | 7338 The invariant that each normative paragraph is associated with a line |
7339 containing the text \LMHash{} should be maintained. Extra occurrences | 7339 containing the text \LMHash{} should be maintained. Extra occurrences |
7340 of \LMHash{} can be added if needed, e.g., in order to make | 7340 of \LMHash{} can be added if needed, e.g., in order to make |
7341 individual \item{}s in itemized lists addressable. Each \LM.. command | 7341 individual \item{}s in itemized lists addressable. Each \LM.. command |
7342 must occur on a separate line. \LMHash{} must occur immediately | 7342 must occur on a separate line. \LMHash{} must occur immediately |
7343 before the associated paragraph, and \LMLabel must occur immediately | 7343 before the associated paragraph, and \LMLabel must occur immediately |
7344 after the associated \section{}, \subsection{} etc. | 7344 after the associated \section{}, \subsection{} etc. |
7345 | 7345 |
7346 ---------------------------------------------------------------------- | 7346 ---------------------------------------------------------------------- |
OLD | NEW |