Commit fd589204 authored by pknaggs's avatar pknaggs

Remove 12.1 and 12.2 markup

Added 13.1 markup
parent 5ddf0fa4
...@@ -49,12 +49,12 @@ set and glossary section in which the word is defined. ...@@ -49,12 +49,12 @@ set and glossary section in which the word is defined.
% %
% Standard Extension Proposal % Standard Extension Proposal
% %
% \ifdraft \ifrelease\else
\def\Tmp{#7}% \def\Tmp{#7}%
\ifx\Tmp\empty\else \ifx\Tmp\empty\else
\marginpar{\textsf{\tiny #7}} \marginpar{\textsf{\tiny #7}}
\fi% \fi%
% \fi% \fi%
% %
% Word Label - If we are showing reference % Word Label - If we are showing reference
% %
......
...@@ -130,9 +130,7 @@ See: \xref[3.4.4 Possible action on an ambiguous condition]{usage:ambiguous}. ...@@ -130,9 +130,7 @@ See: \xref[3.4.4 Possible action on an ambiguous condition]{usage:ambiguous}.
\section{Compliance and labeling} % 7.5 \section{Compliance and labeling} % 7.5
\cbstart\patch{F12} \subsection{Forth-\snapshot{} systems} % 7.5.1
\subsection[Forth-\snapshot systems]{Forth-\snapshot\strike{-1}{25} systems} % 7.5.1
\cbend
The phrase ``Providing the Block word set'' shall be appended to The phrase ``Providing the Block word set'' shall be appended to
the label of any Standard System that provides all of the Block the label of any Standard System that provides all of the Block
...@@ -146,9 +144,7 @@ The phrase ``Providing the Block Extensions word set'' shall be ...@@ -146,9 +144,7 @@ The phrase ``Providing the Block Extensions word set'' shall be
appended to the label of any Standard System that provides all of appended to the label of any Standard System that provides all of
the Block and Block Extensions word sets. the Block and Block Extensions word sets.
\cbstart\patch{F12} \subsection{Forth-\snapshot{} programs} % 7.5.2
\subsection[Forth-\snapshot programs]{Forth-\snapshot\strike{-1}{25} programs} % 7.5.2
\cbend
The phrase ``Requiring the Block word set'' shall be appended to The phrase ``Requiring the Block word set'' shall be appended to
the label of Standard Programs that require the system to provide the label of Standard Programs that require the system to provide
...@@ -269,6 +265,7 @@ to provide all of the Block and Block Extensions word sets. ...@@ -269,6 +265,7 @@ to provide all of the Block and Block Extensions word sets.
\end{worddef} \end{worddef}
\pagebreak
\begin{worddef}{2180}{SAVE-BUFFERS} \begin{worddef}{2180}{SAVE-BUFFERS}
\item \stack{}{} \item \stack{}{}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -13,7 +13,7 @@ and reasons why this is so. ...@@ -13,7 +13,7 @@ and reasons why this is so.
The implementation-defined items in the following list represent The implementation-defined items in the following list represent
characteristics and choices left to the discretion of the characteristics and choices left to the discretion of the
implementor, provided that the requirements of this Standard are implementor, provided that the requirements of this standard are
met. A system shall document the values for, or behaviors of, each met. A system shall document the values for, or behaviors of, each
item. item.
...@@ -127,7 +127,7 @@ item. ...@@ -127,7 +127,7 @@ item.
A system shall document the system action taken upon each of the A system shall document the system action taken upon each of the
general or specific ambiguous conditions identified in this general or specific ambiguous conditions identified in this
Standard. See \xref[Possible actions on an ambiguous condition]{usage:ambiguous}. standard. See \xref[Possible actions on an ambiguous condition]{usage:ambiguous}.
The following general ambiguous conditions could occur because of a The following general ambiguous conditions could occur because of a
combination of factors: combination of factors:
......
% !TeX root = forth.tex
\chapter{The optional Double-Number word set} % 8 \chapter{The optional Double-Number word set} % 8
\wordlist{double} \wordlist{double}
...@@ -62,9 +63,7 @@ See: \xref[3.4.1.3 Text interpreter input number conversion]{usage:numbers}. ...@@ -62,9 +63,7 @@ See: \xref[3.4.1.3 Text interpreter input number conversion]{usage:numbers}.
\section{Compliance and labeling} % 8.5 \section{Compliance and labeling} % 8.5
\cbstart\patch{F12} \subsection{Forth-\snapshot{} systems} % 8.5.1
\subsection[Forth-\snapshot systems]{Forth-\snapshot\strike{-1}{25} systems} % 8.5.1
\cbend
The phrase ``Providing the Double-Number word set'' shall be The phrase ``Providing the Double-Number word set'' shall be
appended to the label of any Standard System that provides all appended to the label of any Standard System that provides all
...@@ -80,9 +79,7 @@ shall be appended to the label of any Standard System that ...@@ -80,9 +79,7 @@ shall be appended to the label of any Standard System that
provides all of the Double-Number and Double-Number Extensions provides all of the Double-Number and Double-Number Extensions
word sets. word sets.
\cbstart\patch{F12} \subsection{Forth-\snapshot{} programs} % 8.5.2
\subsection[Forth-\snapshot programs]{Forth-\snapshot\strike{-1}{25} programs} % 8.5.2
\cbend
The phrase ``Requiring the Double-Number word set'' shall be The phrase ``Requiring the Double-Number word set'' shall be
appended to the label of Standard Programs that require the appended to the label of Standard Programs that require the
...@@ -135,6 +132,9 @@ Extensions word sets. ...@@ -135,6 +132,9 @@ Extensions word sets.
\test{\word{:} cd2 \word{2CONSTANT} \word{;}}{} \\ \test{\word{:} cd2 \word{2CONSTANT} \word{;}}{} \\
\test{-1 -2 cd2 2c2}{} \\ \test{-1 -2 cd2 2c2}{} \\
\test{2c2}{-1 -2} \test{2c2}{-1 -2}
\test{4 5 \word{2CONSTANT} 2c3 \word{IMMEDIATE} 2c3}{4 5} \\
\test{\word{:} cd6 2c3 \word{2LITERAL} \word{;} cd6}{4 5}
\end{testing} \end{testing}
\end{worddef} \end{worddef}
...@@ -167,6 +167,10 @@ Extensions word sets. ...@@ -167,6 +167,10 @@ Extensions word sets.
\begin{testing} \begin{testing}
\test{\word{:} cd1 \word{[} MAX-2INT \word{]} \word{2LITERAL} \word{;}}{}\\ \test{\word{:} cd1 \word{[} MAX-2INT \word{]} \word{2LITERAL} \word{;}}{}\\
\test{cd1}{MAX-2INT} \test{cd1}{MAX-2INT}
\test{\word{2VARIABLE} 2v4 \word{IMMEDIATE} 5 6 2v4 \word{2!}}{} \\
\test{\word{:} cd7 2v4 \word{[} \word{2@} \word{]} \word{2LITERAL} \word{;} cd7}{5 6} \\
\test{\word{:} cd8 \word{[} 6 7 \word{]} 2v4 \word{[} \word{2!} \word{]} \word{;} 2v4 \word{2@}}{6 7}
\end{testing} \end{testing}
\end{worddef} \end{worddef}
...@@ -210,6 +214,9 @@ Extensions word sets. ...@@ -210,6 +214,9 @@ Extensions word sets.
\test{\word{:} cd3 2v2 \word{2!} \word{;}}{} \\ \test{\word{:} cd3 2v2 \word{2!} \word{;}}{} \\
\test{-2 -1 cd3}{} \\ \test{-2 -1 cd3}{} \\
\test{2v2 \word{2@}}{-2 -1} \test{2v2 \word{2@}}{-2 -1}
\test{\word{2VARIABLE} 2v3 \word{IMMEDIATE} 5 6 2v3 \word{2!}}{} \\
\test{2v3 \word{2@}}{5 6}
\end{testing} \end{testing}
\end{worddef} \end{worddef}
...@@ -387,8 +394,6 @@ Extensions word sets. ...@@ -387,8 +394,6 @@ Extensions word sets.
toward the most-significant bit, filling the vacated toward the most-significant bit, filling the vacated
least-significant bit with zero. least-significant bit with zero.
\see \rref{core:2*}{}.
\begin{testing} \begin{testing}
\test{ 0. \word{D2*}}{0. \word{D2*}} \\ \test{ 0. \word{D2*}}{0. \word{D2*}} \\
\test{MIN-INT 0 \word{D2*}}{0 1} \\ \test{MIN-INT 0 \word{D2*}}{0 1} \\
...@@ -405,8 +410,6 @@ Extensions word sets. ...@@ -405,8 +410,6 @@ Extensions word sets.
toward the least-significant bit, leaving the most-significant toward the least-significant bit, leaving the most-significant
bit unchanged. bit unchanged.
\see \rref{core:2/}{}.
\begin{testing} \begin{testing}
\test{ 0. \word{D2/}}{0. } \\ \test{ 0. \word{D2/}}{0. } \\
\test{ 1. \word{D2/}}{0. } \\ \test{ 1. \word{D2/}}{0. } \\
......
...@@ -13,15 +13,16 @@ None. ...@@ -13,15 +13,16 @@ None.
\label{exception:throw} \label{exception:throw}
The \word{THROW} values \{-255{\ldots}-1\} shall be used only as The \word{THROW} values \{-255{\ldots}-1\} shall be used only as
assigned by this Standard. The values \{-4095{\ldots}-256\} assigned by this standard. The values \{-4095{\ldots}-256\}
shall be used only as assigned by a system. shall be used only as assigned by a system.
\remove{x:throw-iors}{%
If the File-Access or Memory-Allocation word sets are implemented, If the File-Access or Memory-Allocation word sets are implemented,
it is recommended that the non-zero values of \emph{ior} lie within it is recommended that the non-zero values of \emph{ior} lie within
the range of system \word{THROW} values, as defined above. In an the range of system \word{THROW} values, as defined above. In an
operating-system environment, this can sometimes be accomplished operating-system environment, this can sometimes be accomplished
by ``biasing'' the range of operating-system exception codes to fall by ``biasing'' the range of operating-system exception codes to fall
within the \word{THROW} range. within the \word{THROW} range.}
Programs shall not define values for use with \word{THROW} in the Programs shall not define values for use with \word{THROW} in the
range \{-4095{\ldots}-1\}. range \{-4095{\ldots}-1\}.
...@@ -162,8 +163,8 @@ See: \xref[3.4.4 Possible actions on an ambiguous condition]{usage:ambiguous}. ...@@ -162,8 +163,8 @@ See: \xref[3.4.4 Possible actions on an ambiguous condition]{usage:ambiguous}.
\throwdef{-75}{\word[file]{WRITE-FILE}} \throwdef{-75}{\word[file]{WRITE-FILE}}
\throwdef{-76}{\word[file]{WRITE-LINE}} \throwdef{-76}{\word[file]{WRITE-LINE}}
\throwdef{-77}{Malformed xchar} \throwdef{-77}{Malformed xchar}
\throwdef[substitute]{-78}{\word[string]{SUBSTITUTE}} \throwdef{-78}{\word[string]{SUBSTITUTE}}
\throwdef[substitute]{-79}{\word[string]{REPLACES}} \throwdef{-79}{\word[string]{REPLACES}}
\end{minipage} \end{minipage}
\\[-2ex] \hline\hline \\[-2ex] \hline\hline
\end{tabular} \end{tabular}
...@@ -214,9 +215,7 @@ state for continued execution past the \word{CATCH}. ...@@ -214,9 +215,7 @@ state for continued execution past the \word{CATCH}.
\section{Compliance and labeling} % 9.5 \section{Compliance and labeling} % 9.5
\cbstart\patch{F12} \subsection{Forth-\snapshot{} systems} % 9.5.1
\subsection[Forth-\snapshot systems]{Forth-\snapshot\strike{-1}{25} systems} % 9.5.1
\cbend
The phrase ``Providing the Exception word set'' shall be appended to The phrase ``Providing the Exception word set'' shall be appended to
the label of any Standard System that provides all of the Exception the label of any Standard System that provides all of the Exception
...@@ -230,9 +229,7 @@ The phrase ``Providing the Exception Extensions word set'' shall be ...@@ -230,9 +229,7 @@ The phrase ``Providing the Exception Extensions word set'' shall be
appended to the label of any Standard System that provides all of appended to the label of any Standard System that provides all of
the Exception and Exception Extensions word sets. the Exception and Exception Extensions word sets.
\cbstart\patch{F12} \subsection{Forth-\snapshot{} programs} % 9.5.2
\subsection[Forth-\snapshot programs]{Forth-\snapshot\strike{-1}{25} programs} % 9.5.2
\cbend
The phrase ``Requiring the Exception word set'' shall be appended The phrase ``Requiring the Exception word set'' shall be appended
to the label of Standard Programs that require the system to provide to the label of Standard Programs that require the system to provide
...@@ -272,58 +269,54 @@ to provide all of the Exception and Exception Extensions word sets. ...@@ -272,58 +269,54 @@ to provide all of the Exception and Exception Extensions word sets.
\begin{implement} % I.9.1.0875 CATCH \begin{implement} % I.9.1.0875 CATCH
\dffamily \dffamily
\cbstart\patch{ed12}
\uline{%
This sample implementation of \word{CATCH} uses the non-standard This sample implementation of \word{CATCH} uses the non-standard
words described below. They or their equivalents are available in many words described below. They or their equivalents are available in many
systems. Other implementation strategies, including directly saving the systems. Other implementation strategies, including directly saving the
value of \word[core]{DEPTH}, are possible if such words are not available.} value of \word[core]{DEPTH}, are possible if such words are not available.
\begin{quote} \begin{description}
\uline{\texttt{SP@}} \stack{}{\uline{addr}} \item[\texttt{SP@}] \stack{}{addr} \\
\uline{returns the address corresponding to the top of data stack.} returns the address corresponding to the top of data stack.
\uline{\texttt{SP!}} \stack{\uline{addr}}{} \item[\texttt{SP!}] \stack{addr}{} \\
\uline{sets the stack pointer to \emph{addr}, thus restoring the stack sets the stack pointer to \emph{addr}, thus restoring the stack
depth to the same depth that existed just before \emph{addr} was depth to the same depth that existed just before \emph{addr} was
acquired by executing \texttt{SP@}.} acquired by executing \texttt{SP@}.
\uline{\texttt{RP@}} \stack{}{\uline{addr}} \item[\texttt{RP@}] \stack{}{addr} \\
\uline{returns the address corresponding to the top of return stack.} returns the address corresponding to the top of return stack.
\uline{\texttt{RP!}} \stack{\uline{addr}}{} \item[\texttt{RP!}] \stack{addr}{} \\
\uline{sets the return stack pointer to \emph{addr}, thus restoring the sets the return stack pointer to \emph{addr}, thus restoring the
return stack depth to the same depth that existed just before return stack depth to the same depth that existed just before
\emph{addr} was acquired by executing \texttt{RP@}.} \emph{addr} was acquired by executing \texttt{RP@}.
\end{quote} \end{description}
\ttfamily \ttfamily
\begin{tabbing} \begin{tabbing}
\tab \= \tab \= \hspace{7em} \= ( saved-sp ) \= \kill \tab \= \tab \= \hspace{7em} \= ( saved-sp ) \= \kill
\uline{\word{VARIABLE} HANDLER ~ 0 HANDLER \word{!}} ~ \uline{\word{bs} \textdf{last exception handler}} \\[\parskip] \word{VARIABLE} HANDLER ~ 0 HANDLER \word{!} ~ \word{bs} \textdf{last exception handler} \\[\parskip]
\+ \uline{\word{:} \word{CATCH} ~ \word{p} xt -{}- exception\# | 0 )} \uline{\word{bs} \textdf{return addr on stack}} \\ \+ \word{:} \word{CATCH} ~ \word{p} xt -{}- exception\# | 0 \word{bs} \textdf{return addr on stack} \\
\uline{SP@ \word{toR}} \>\> \uline{\word{p} xt )}\> \uline{\word{bs} \textdf{save data stack pointer}} \\ SP@ \word{toR} \>\> \word{p} xt )\> \word{bs} \textdf{save data stack pointer} \\
\uline{HANDLER \word{@} \word{toR}} \>\> \uline{\word{p} xt )}\> \uline{\word{bs} \textdf{and previous handler}} \\ HANDLER \word{@} \word{toR} \>\> \word{p} xt )\> \word{bs} \textdf{and previous handler} \\
\uline{RP@ HANDLER \word{!}} \>\> \uline{\word{p} xt )}\> \uline{\word{bs} \textdf{set current handler}} \\ RP@ HANDLER \word{!} \>\> \word{p} xt )\> \word{bs} \textdf{set current handler} \\
\uline{\word{EXECUTE}} \>\> \uline{\word{p} )} \> \uline{\word{bs} \textdf{execute returns if no} THROW} \\ \word{EXECUTE} \>\> \word{p} ) \> \word{bs} \textdf{execute returns if no} THROW \\
\uline{\word{Rfrom} HANDLER \word{!}} \>\> \uline{\word{p} )} \> \uline{\word{bs} \textdf{restore previous handler}} \\ \word{Rfrom} HANDLER \word{!} \>\> \word{p} ) \> \word{bs} \textdf{restore previous handler} \\
\uline{\word{Rfrom} \word{DROP}} \>\> \uline{\word{p} )} \> \uline{\word{bs} \textdf{discard saved stack ptr}} \\ \word{Rfrom} \word{DROP} \>\> \word{p} ) \> \word{bs} \textdf{discard saved stack ptr} \\
\- \uline{0} \>\> \uline{\word{p} 0 )} \> \uline{\word{bs} \textdf{normal completion}} \\ \- 0 \>\> \word{p} 0 ) \> \word{bs} \textdf{normal completion} \\
\uline{\word{;}} \word{;}
\end{tabbing} \end{tabbing}
\uline{% \dffamily
In a multi-tasking system, the \texttt{HANDLER} variable should be in In a multi-tasking system, the \texttt{HANDLER} variable should be in
the per-task variable area (i.e., a user variable).} the per-task variable area (i.e., a user variable).
\uline{%
This sample implementation does not explicitly handle the case in This sample implementation does not explicitly handle the case in
which \word{CATCH} has never been called (i.e., the \word{ABORT} which \word{CATCH} has never been called (i.e., the \word{ABORT}
behavior). One solution would be to execute a \word{CATCH} within behavior). One solution would be to execute a \word{CATCH} within
\word{QUIT}, so that there is always an ``exception handler of last \word{QUIT}, so that there is always an ``exception handler of last
resort'' present, as shown in \iref{core:QUIT}{}.} resort'' present, as shown in \iref{core:QUIT}{}.
\cbend
\end{implement} \end{implement}
\begin{testing} \begin{testing}
...@@ -339,7 +332,7 @@ to provide all of the Exception and Exception Extensions word sets. ...@@ -339,7 +332,7 @@ to provide all of the Exception and Exception Extensions word sets.
frame from the exception stack, along with everything on the frame from the exception stack, along with everything on the
return stack above that frame. Then restore the input source return stack above that frame. Then restore the input source
specification in use before the corresponding \word{CATCH} specification in use before the corresponding \word{CATCH}
and adjust the depths of all stacks defined by this Standard and adjust the depths of all stacks defined by this standard
so that they are the same as the depths saved in the exception so that they are the same as the depths saved in the exception
frame (\param{i} is the same number as the \param{i} in the input frame (\param{i} is the same number as the \param{i} in the input
arguments to the corresponding \word{CATCH}), put \param{n} on arguments to the corresponding \word{CATCH}), put \param{n} on
...@@ -412,24 +405,22 @@ to provide all of the Exception and Exception Extensions word sets. ...@@ -412,24 +405,22 @@ to provide all of the Exception and Exception Extensions word sets.
\end{rationale} \end{rationale}
\begin{implement} \begin{implement}
\cbstart\patch{ed12} \textdf{This is the counter part to \iref{exception:CATCH}{}.}
\uline{\textdf{This is the counter part to \iref{exception:CATCH}{}.}}
\begin{tabbing} \begin{tabbing}
\tab \= \tab \= \hspace{7em} \= ( saved-sp ) \= \kill \tab \= \tab \= \hspace{7em} \= ( saved-sp ) \= \kill
\+ \uline{\word{:} \word{THROW}} \uline{\word{p} ??? exception\# -{}- ??? exception\# )} \\ \+ \word{:} \word{THROW} \word{p} ??? exception\# -{}- ??? exception\# ) \\
\+ \uline{\word{qDUP} \word{IF}} \> \> \uline{\word{p} exc\# )} \> \uline{\word{bs} 0 THROW \textdf{is no-op}} \\ \+ \word{qDUP} \word{IF} \> \> \word{p} exc\# ) \> \word{bs} 0 THROW \textdf{is no-op} \\
\uline{HANDLER \word{@} RP!} \> \uline{\word{p} exc\# )} \> \uline{\word{bs} \textdf{restore prev return stack}} \\ HANDLER \word{@} RP! \> \word{p} exc\# ) \> \word{bs} \textdf{restore prev return stack} \\
\uline{\word{Rfrom} HANDLER \word{!}} \> \uline{\word{p} exc\# )} \> \uline{\word{bs} \textdf{restore prev handler}} \\ \word{Rfrom} HANDLER \word{!} \> \word{p} exc\# ) \> \word{bs} \textdf{restore prev handler} \\
\uline{\word{Rfrom} \word{SWAP} \word{toR}} \> \uline{\word{p} saved-sp )}\> \uline{\word{bs} exc\# \textdf{on return stack}} \\ \word{Rfrom} \word{SWAP} \word{toR} \> \word{p} saved-sp ) \> \word{bs} exc\# \textdf{on return stack} \\
\uline{SP! \word{DROP} \word{Rfrom}} \> \uline{\word{p} exc\# )} \> \uline{\word{bs} \textdf{restore stack}} \\ SP! \word{DROP} \word{Rfrom} \> \word{p} exc\# ) \> \word{bs} \textdf{restore stack} \\
\uline{\word{bs} \textdf{Return to the caller of CATCH because return}} \\ \word{bs} \textdf{Return to the caller of CATCH because return} \\
\uline{\word{bs} \textdf{stack is restored to the state that existed}} \\ \word{bs} \textdf{stack is restored to the state that existed} \\
\- \uline{\word{bs} \textdf{when CATCH began execution}} \\ \- \word{bs} \textdf{when CATCH began execution} \\
\- \uline{\word{THEN}} \\ \- \word{THEN} \\
\uline{\word{;}} \word{;}
\end{tabbing} \end{tabbing}
\cbend
\end{implement} \end{implement}
\begin{testing} \ttfamily \begin{testing} \ttfamily
...@@ -473,7 +464,7 @@ to provide all of the Exception and Exception Extensions word sets. ...@@ -473,7 +464,7 @@ to provide all of the Exception and Exception Extensions word sets.
\see \wref{core:ABORT}{ABORT}. \see \wref{core:ABORT}{ABORT}.
\begin{implement} % I.9.1.0875 CATCH \begin{implement} % I.9.1.0875 CATCH
\place{ed12}{\word{:} \word{ABORT} ~ -1 \word{THROW} ~ \word{;}} \word{:} \word{ABORT} ~ -1 \word{THROW} ~ \word{;}
\end{implement} \end{implement}
\begin{testing} \begin{testing}
......
This diff is collapsed.
...@@ -40,6 +40,7 @@ under the following assumptions: ...@@ -40,6 +40,7 @@ under the following assumptions:
Append table \ref{file:types} to table \ref{table:datatypes}. Append table \ref{file:types} to table \ref{table:datatypes}.
\patch{x:throw-iors}
\begin{table}[h] \begin{table}[h]
\begin{center} \begin{center}
\caption{Data types} \caption{Data types}
...@@ -48,7 +49,9 @@ Append table \ref{file:types} to table \ref{table:datatypes}. ...@@ -48,7 +49,9 @@ Append table \ref{file:types} to table \ref{table:datatypes}.
\hline\hline \hline\hline
\emph{Symbol} & \emph{Data type} & \emph{Size on stack} \\ \emph{Symbol} & \emph{Data type} & \emph{Size on stack} \\
\hline \hline
\emph{ior} & I/O results & 1 cell \\ \cbstart
\sout{\emph{ior}} & \sout{I/O results} & \sout{1 cell} \\
\cbend
\emph{fam} & file access method & 1 cell \\ \emph{fam} & file access method & 1 cell \\
\emph{fileid} & file identifier & 1 cell \\ \emph{fileid} & file identifier & 1 cell \\
\hline\hline \hline\hline
...@@ -63,18 +66,22 @@ that are passed to file operators to designate specific files. ...@@ -63,18 +66,22 @@ that are passed to file operators to designate specific files.
Opening a file assigns a file identifier, which remains valid Opening a file assigns a file identifier, which remains valid
until closed. until closed.
\subsubsection{I/O results} % 11.3.1.2 \cbstart\patch{x:throw-iors}
\subsubsection[I/O results]{\sout{I/O results}} % 11.3.1.2
\label{file:ior} \label{file:ior}
\sout{%
I/O results are single-cell numbers indicating the result of I/O I/O results are single-cell numbers indicating the result of I/O
operations. A value of zero indicates that the I/O operation operations. A value of zero indicates that the I/O operation
completed successfully; other values and their meanings are completed successfully; other values and their meanings are
implementation-defined. Reaching the end of a file shall be implementation-defined. Reaching the end of a file shall be
reported as zero. reported as zero.}
\sout{%
An I/O exception in the execution of a File-Access word that can An I/O exception in the execution of a File-Access word that can
return an I/O result shall not cause a \word[exception]{THROW}; return an I/O result shall not cause a \word[exception]{THROW};
exception indications are returned in the \emph{ior}. exception indications are returned in the \emph{ior}.}
\cbend
\subsubsection{File access methods} % 11.3.1.3 \subsubsection{File access methods} % 11.3.1.3
...@@ -112,10 +119,9 @@ shall contain zero, \word{SOURCE-ID} shall contain the \emph{fileid} ...@@ -112,10 +119,9 @@ shall contain zero, \word{SOURCE-ID} shall contain the \emph{fileid}
of that text file, and the input buffer shall contain one line of of that text file, and the input buffer shall contain one line of
the text file. During text interpretation from a text file, the the text file. During text interpretation from a text file, the
value returned by \word{FILE-POSITION} for the \param{fileid} returned value returned by \word{FILE-POSITION} for the \param{fileid} returned
by \word{SOURCE-ID} is \replace{ed12}{not defined}{undefined}. A standard program by \word{SOURCE-ID} is undefined. A standard program
\replace{ed12}{may}{shall} not call shall not call \word{REPOSITION-FILE} on the \param{fileid} returned
\word{REPOSITION-FILE} on the \param{fileid} returned by by \word{SOURCE-ID}.
\word{SOURCE-ID}.
Input with \word{INCLUDED}, \word{INCLUDE-FILE}, \word[block]{LOAD} Input with \word{INCLUDED}, \word{INCLUDE-FILE}, \word[block]{LOAD}
and \word[block]{EVALUATE} shall be nestable in any order to at least and \word[block]{EVALUATE} shall be nestable in any order to at least
...@@ -172,7 +178,7 @@ See: \xref[3.4.1 Parsing]{usage:parsing}. ...@@ -172,7 +178,7 @@ See: \xref[3.4.1 Parsing]{usage:parsing}.
\item input file state after an exception \item input file state after an exception
(\wref{file:INCLUDE-FILE}{INCLUDE-FILE}, (\wref{file:INCLUDE-FILE}{INCLUDE-FILE},
\wref{file:INCLUDED}{INCLUDED}); \wref{file:INCLUDED}{INCLUDED});
\item \emph{ior} values and meaning (\xref[11.3.1.2 I/O results]{file:ior}); \item \remove{x:throw-iors}{\emph{ior} values and meaning} (\xref[11.3.1.2 I/O results]{file:ior});
\item maximum depth of file input nesting \item maximum depth of file input nesting
(\xref[11.3.4 Input source]{file:source}); (\xref[11.3.4 Input source]{file:source});
\item maximum size of input line (\xref[11.3.6 Parsing]{file:parsing}); \item maximum size of input line (\xref[11.3.6 Parsing]{file:parsing});
...@@ -237,9 +243,7 @@ See: \xref[3.4.1 Parsing]{usage:parsing}. ...@@ -237,9 +243,7 @@ See: \xref[3.4.1 Parsing]{usage:parsing}.
\section{Compliance and labeling} % 11.5 \section{Compliance and labeling} % 11.5
\cbstart\patch{F12} \subsection{Forth-\snapshot{} systems} % 11.5.1
\subsection[Forth-\snapshot systems]{Forth-\snapshot\strike{-1}{25} systems} % 11.5.1
\cbend
The phrase ``Providing the File Access word set'' shall be appended The phrase ``Providing the File Access word set'' shall be appended
to the label of any Standard System that provides all of the File to the label of any Standard System that provides all of the File
...@@ -253,9 +257,7 @@ The phrase ``Providing the File Access Extensions word set'' shall ...@@ -253,9 +257,7 @@ The phrase ``Providing the File Access Extensions word set'' shall
be appended to the label of any Standard System that provides all of be appended to the label of any Standard System that provides all of
the File Access and File Access Extensions word sets. the File Access and File Access Extensions word sets.
\cbstart\patch{F12} \subsection{Forth-\snapshot{} programs} % 11.5.2
\subsection[Forth-\snapshot programs]{Forth-\snapshot\strike{-1}{25} programs} % 11.5.2
\cbend
The phrase ``Requiring the File Access word set'' shall be appended The phrase ``Requiring the File Access word set'' shall be appended
to the label of Standard Programs that require the system to provide to the label of Standard Programs that require the system to provide
...@@ -314,13 +316,9 @@ provide all of the File Access and File Access Extensions word sets. ...@@ -314,13 +316,9 @@ provide all of the File Access and File Access Extensions word sets.
The arguments to \word{READ-FILE} and \word{WRITE-FILE} are The arguments to \word{READ-FILE} and \word{WRITE-FILE} are
arrays of character storage elements, each element consisting arrays of character storage elements, each element consisting
of at least 8 bits. The \remove{ed12}{Technical} Committee intends that, in of at least 8 bits. The committee intends that, in
\word{BIN} mode, the contents of these storage elements can be \word{BIN} mode, the contents of these storage elements can be
written to a file and later read back without alteration. written to a file and later read back without alteration.
\remove{ed12}{The
Technical Committee has declined to address issues regarding
the impact of ``wide'' characters on the File and Block word
sets.}
\end{rationale} \end{rationale}
\end{worddef} \end{worddef}
...@@ -623,7 +621,7 @@ provide all of the File Access and File Access Extensions word sets. ...@@ -623,7 +621,7 @@ provide all of the File Access and File Access Extensions word sets.
\end{quote}\setwordlist{file} \end{quote}\setwordlist{file}
In this example, \word[exception]{THROW} is used to handle In this example, \word[exception]{THROW} is used to handle
\remove{ed12}{(unexpected)} exception conditions, which are reported as exception conditions, which are reported as
non-zero values of the \param{ior} return value from non-zero values of the \param{ior} return value from
\word{READ-FILE}. End-of-file is reported as a zero value of \word{READ-FILE}. End-of-file is reported as a zero value of
the ``length'' return value. the ``length'' return value.
...@@ -697,12 +695,6 @@ provide all of the File Access and File Access Extensions word sets. ...@@ -697,12 +695,6 @@ provide all of the File Access and File Access Extensions word sets.
\end{tabbing} \end{tabbing}
\end{quote}\setwordlist{file} \end{quote}\setwordlist{file}
\remove{ed12}{%
In this example, \word[exception]{THROW} is used to handle
(unexpected) I/O exception condition, which are reported as
non-zero values of the ``\emph{ior}'' return value from
\word{READ-LINE}.}
\word{READ-LINE} needs a separate end-of-file flag because \word{READ-LINE} needs a separate end-of-file flag because
empty (zero-length) lines are a routine occurrence, so a empty (zero-length) lines are a routine occurrence, so a
zero-length line cannot be used to signify end-of-file. zero-length line cannot be used to signify end-of-file.
...@@ -858,13 +850,11 @@ provide all of the File Access and File Access Extensions word sets. ...@@ -858,13 +850,11 @@ provide all of the File Access and File Access Extensions word sets.
When the possibility of overwriting a string can arise, it is When the possibility of overwriting a string can arise, it is
prudent to copy the string to a ``safe'' buffer allocated by prudent to copy the string to a ``safe'' buffer allocated by
the application. the application.
\remove{ed12}{%
Programs wishing to parse in the fashion of \word{Sq} are
advised to use \word[core]{PARSE} or \word[core]{WORD}
\word[core]{COUNT} instead of \word{Sq}, preventing the
overwriting of the interpreted string buffer.}
\end{rationale} \end{rationale}
\begin{testing}
\test{\word{Sq} A String"\word{2DROP}}{} \tab \word{bs} \textdf{There is no space between the " and \word{2DROP}}
\end{testing}
\end{worddef} \end{worddef}
......
...@@ -267,10 +267,10 @@ See: ...@@ -267,10 +267,10 @@ See:
(\wref{floating:Fd}{F.}, (\wref{floating:Fd}{F.},
\wref{floating:FEd}{FE.}, \wref{floating:FEd}{FE.},
\wref{floating:FSd}{FS.}). \wref{floating:FSd}{FS.}).
\item \place{x:stoftos}{\param{n} can't be precisely represented as \item \param{n} can't be precisely represented as
\emph{float} in \wref{floating:StoF}{S>F};} \emph{float} in \wref{floating:StoF}{S>F};
\item \place{x:stoftos}{integer part of \emph{float} can't be represented \item integer part of \emph{float} can't be represented
by \param{n} in \wref{floating:FtoS}{F>S}.} by \param{n} in \wref{floating:FtoS}{F>S}.
\end{itemize} \end{itemize}
\subsubsection{Other system documentation} % 12.4.1.3 \subsubsection{Other system documentation} % 12.4.1.3
...@@ -304,9 +304,7 @@ See: ...@@ -304,9 +304,7 @@ See:
\section{Compliance and labeling} % 12.5 \section{Compliance and labeling} % 12.5
\cbstart\patch{F12} \subsection{Forth-\snapshot{} systems} % 12.5.1
\subsection[Forth-\snapshot systems]{Forth-\snapshot\strike{-1}{25} systems} % 12.5.1
\cbend
The phrase ``Providing the Floating-Point word set'' shall be The phrase ``Providing the Floating-Point word set'' shall be
appended to the label of any Standard System that provides all of appended to the label of any Standard System that provides all of
...@@ -321,9 +319,7 @@ The phrase ``Providing the Floating-Point Extensions word set'' shall ...@@ -321,9 +319,7 @@ The phrase ``Providing the Floating-Point Extensions word set'' shall
be appended to the label of any Standard System that provides all of be appended to the label of any Standard System that provides all of
the Floating-Point and Floating-Point Extensions word sets. the Floating-Point and Floating-Point Extensions word sets.
\cbstart\patch{F12} \subsection{Forth-\snapshot{} programs} % 12.5.2
\subsection[Forth-\snapshot programs]{Forth-\snapshot\strike{-1}{25} programs} % 12.5.2
\cbend
The phrase ``Requiring the Floating-Point word set'' shall be The phrase ``Requiring the Floating-Point word set'' shall be
appended to the label of Standard Programs that require the system appended to the label of Standard Programs that require the system
...@@ -383,8 +379,8 @@ word sets. ...@@ -383,8 +379,8 @@ word sets.
does the text interpreter since the latter defines rules for does the text interpreter since the latter defines rules for
composing source programs whereas \word{toFLOAT} defines rules composing source programs whereas \word{toFLOAT} defines rules
for accepting data. \word{toFLOAT} is defined as broadly as is for accepting data. \word{toFLOAT} is defined as broadly as is
feasible to permit input of data from Forth\place{F12}{-\snapshot} systems as well feasible to permit input of data from Forth-\snapshot{} systems
as other widely used standard programming environments. as well as other widely used standard programming environments.
This is a synthesis of common FORTRAN practice. Embedded spaces This is a synthesis of common FORTRAN practice. Embedded spaces
are explicitly forbidden in much scientific usage, as are other are explicitly forbidden in much scientific usage, as are other
...@@ -484,8 +480,11 @@ word sets. ...@@ -484,8 +480,11 @@ word sets.
\param{d} is the double-cell signed-integer equivalent of the \param{d} is the double-cell signed-integer equivalent of the
integer portion of \param{r}. The fractional portion of \param{r} integer portion of \param{r}. The fractional portion of \param{r}
is discarded. An ambiguous condition exists if the integer portion is discarded. An ambiguous condition exists if the integer portion
of \param{r} cannot be precisely represented as a double-cell of \param{r} cannot be \remove{ed13}{precisely} represented as a double-cell
signed integer. signed integer.
\note \place{ed13}{Rounding the floating-point value prior to calling \word{FtoD} is
advised, because \word{FtoD} rounds towards zero.}
\end{worddef} \end{worddef}