Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    re80ebe5 r79f64f1  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Tue Aug  2 17:39:02 2016
    14 %% Update Count     : 1286
     13%% Last Modified On : Mon Aug  1 09:11:24 2016
     14%% Update Count     : 1271
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    226226
    227227\section{Interoperability}
    228 \label{s:Interoperability}
    229228
    230229\CFA is designed to integrate well with existing C programs and libraries.
     
    315314The \CFA compilation message is printed at the beginning of a compilation.
    316315\textbf{This option is the default.}
    317 
    318 \item
    319 \Indexc{-no-include-std}\index{compilation option!-no-include-std@©-no-include-std©}
    320 Do not supply ©extern "C"© wrappers for \Celeven standard include files (see~\VRef{s:StandardHeaders}).
    321 \textbf{This option is \emph{not} the default.}
    322316\end{description}
    323317
     
    43694363
    43704364
    4371 \section{New Keywords}
    4372 \label{s:NewKeywords}
    4373 
    4374 \begin{quote2}
    4375 \begin{tabular}{ll}
    4376 ©catch©                 & ©lvalue©              \\
    4377 ©catchResume©   &                               \\
    4378 ©choose©                & ©otype©               \\
    4379                                 &                               \\
    4380 ©disable©               & ©throw©               \\
    4381 ©dtype©                 & ©throwResume© \\
    4382                                 & ©trait©               \\
    4383 ©enable©                & ©try©                 \\
    4384                                 &                               \\
    4385 ©fallthrough©                                   \\
    4386 ©fallthru©                                              \\
    4387 ©finally©                                               \\
    4388 ©forall©                                                \\
    4389 ©ftype©                                                 \\
    4390 \end{tabular}
    4391 \end{quote2}
    4392 
    4393 
    4394 \section{Standard Headers}
    4395 \label{s:StandardHeaders}
    4396 
    4397 C prescribes the following standard header-files:
    4398 \begin{quote2}
    4399 \begin{minipage}{\linewidth}
    4400 \begin{tabular}{lll}
    4401 assert.h        & math.h                & stdlib.h              \\
    4402 complex.h       & setjmp.h              & stdnoreturn.h \\
    4403 ctype.h         & signal.h              & string.h              \\
    4404 errno.h         & stdalign.h    & tgmath.h              \\
    4405 fenv.h          & stdarg.h              & threads.h             \\
    4406 float.h         & stdatomic.h   & time.h                \\
    4407 inttypes.h      & stdbool.h             & uchar.h               \\
    4408 iso646.h        & stddef.h              & wchar.h               \\
    4409 limits.h        & stdint.h              & wctype.h              \\
    4410 locale.h        & stdio.h               & unistd.h\footnote{\CFA extension}
    4411 \end{tabular}
    4412 \end{minipage}
    4413 \end{quote2}
    4414 For the prescribed head-files, \CFA implicit wraps their includes in an ©extern "C"©;
    4415 hence, names in these include files are not mangled\index{mangling!name} (see~\VRef{s:Interoperability}).
    4416 All other C header files must be explicitly wrapped in ©extern "C"© to prevent name mangling.
     4365\section{New Keywowrds}
     4366
     4367©catch©, ©catchResume©, ©choose©, \quad ©disable©, ©dtype©, \quad ©enable©, \quad ©fallthrough©, ©fallthru©, ©finally©, ©forall©, ©ftype©, \quad ©lvalue©, \quad ©otype©, \quad ©throw©, ©throwResume©, ©trait©, ©try©
    44174368
    44184369
     
    44244375\item
    44254376\begin{description}
    4426 \item[Change:] add new keywords (see~\VRef{s:NewKeywords}) \\
     4377\item[Change:] add new keywords \\
    44274378New keywords are added to \CFA.
    44284379\item[Rationale:] keywords added to implement new semantics of \CFA.
     
    45224473\begin{description}
    45234474\item[Change:] have ©struct© introduce a scope for nested types
    4524 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing
     4475In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing 
    45254476Example:
    45264477\begin{lstlisting}
     
    46454596%$
    46464597\begin{lstlisting}[mathescape=off]
    4647 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¡" | 7
    4648          | "x ¿" | 8 | "x «" | 9 | endl;
     4598sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¡" | 7 | "x ¿" | 8 | "x «" | 9 | endl;
    46494599\end{lstlisting}
    46504600%$
     
    46564606A seperator does not appear after a C string ending with the (extended) \Index{ASCII}\index{ASCII!extended} characters: ©,.:;!?)]}%¢»©
    46574607\begin{lstlisting}[belowskip=0pt]
    4658 sout | 1 | ", x" | 2 | ". x" | 3 | ": x" | 4 | "; x" | 5 | "! x" | 6 | "? x" | 7
    4659          | ") x" | 8 | "] x" | 9 | "} x" | 10 | "% x" | 11 | "¢ x" | 12 | "» x" | endl;
     4608sout | 1 | ", x" | 2 | ". x" | 3 | ": x" | 4 | "; x" | 5 | "! x" | 6 | "? x" | 7 | ") x" | 8 | "] x" | 9 | "} x"
     4609         | 10 | "% x" | 11 | "¢ x" | 12 | "» x" | endl;
    46604610\end{lstlisting}
    46614611\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    46734623The following \CC-style \Index{manipulator}s allow further control over implicit seperation.
    46744624\begin{lstlisting}[mathescape=off,belowskip=0pt]
    4675 sout | sepOn | 1 | 2 | 3 | sepOn | endl;        §\C{// separator at start of line}§
     4625sout | sepOn | 1 | 2 | 3 | sepOn | endl;        // separator at start of line
    46764626\end{lstlisting}
    46774627\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    46794629\end{lstlisting}
    46804630\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    4681 sout | 1 | sepOff | 2 | 3 | endl;                       §\C{// turn off implicit separator temporarily}§
     4631sout | 1 | sepOff | 2 | 3 | endl;                       // turn off implicit separator temporarily
    46824632\end{lstlisting}
    46834633\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    46854635\end{lstlisting}
    46864636\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    4687 sout | sepDisable | 1 | 2 | 3 | endl;           §\C{// turn off implicit separation, affects all subsequent prints}§
     4637sout | sepDisable | 1 | 2 | 3 | endl;           // turn off implicit separation, affects all subsequent prints
    46884638\end{lstlisting}
    46894639\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    46914641\end{lstlisting}
    46924642\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    4693 sout | 1 | sepOn | 2 | 3 | endl;                        §\C{// turn on implicit separator temporarily}§
     4643sout | 1 | sepOn | 2 | 3 | endl;                        // turn on implicit separator temporarily
    46944644\end{lstlisting}
    46954645\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    46974647\end{lstlisting}
    46984648\begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt]
    4699 sout | sepEnable | 1 | 2 | 3 | endl;            §\C{// turn on implicit separation, affects all subsequent prints}§
     4649sout | sepEnable | 1 | 2 | 3 | endl;            // turn on implicit separation, affects all subsequent prints
    47004650\end{lstlisting}
    47014651\begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    47034653\end{lstlisting}
    47044654\begin{lstlisting}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt]
    4705 sepSet( sout, ", $" );                                          §\C{// change separator from " " to ", \$"}§
     4655sepSet( sout, ", $" );                                          // change separator from " " to ", $"
    47064656sout | 1 | 2 | 3 | endl;
    47074657\end{lstlisting}
Note: See TracChangeset for help on using the changeset viewer.