Changes in doc/user/user.tex [e80ebe5:79f64f1]
- File:
-
- 1 edited
-
doc/user/user.tex (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/user/user.tex
re80ebe5 r79f64f1 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Tue Aug 2 17:39:02201614 %% Update Count : 12 8613 %% Last Modified On : Mon Aug 1 09:11:24 2016 14 %% Update Count : 1271 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 226 226 227 227 \section{Interoperability} 228 \label{s:Interoperability}229 228 230 229 \CFA is designed to integrate well with existing C programs and libraries. … … 315 314 The \CFA compilation message is printed at the beginning of a compilation. 316 315 \textbf{This option is the default.} 317 318 \item319 \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.}322 316 \end{description} 323 317 … … 4369 4363 4370 4364 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© 4417 4368 4418 4369 … … 4424 4375 \item 4425 4376 \begin{description} 4426 \item[Change:] add new keywords (see~\VRef{s:NewKeywords})\\4377 \item[Change:] add new keywords \\ 4427 4378 New keywords are added to \CFA. 4428 4379 \item[Rationale:] keywords added to implement new semantics of \CFA. … … 4522 4473 \begin{description} 4523 4474 \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 4475 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing 4525 4476 Example: 4526 4477 \begin{lstlisting} … … 4645 4596 %$ 4646 4597 \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; 4598 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¡" | 7 | "x ¿" | 8 | "x «" | 9 | endl; 4649 4599 \end{lstlisting} 4650 4600 %$ … … 4656 4606 A seperator does not appear after a C string ending with the (extended) \Index{ASCII}\index{ASCII!extended} characters: ©,.:;!?)]}%¢»© 4657 4607 \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;4608 sout | 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; 4660 4610 \end{lstlisting} 4661 4611 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4673 4623 The following \CC-style \Index{manipulator}s allow further control over implicit seperation. 4674 4624 \begin{lstlisting}[mathescape=off,belowskip=0pt] 4675 sout | sepOn | 1 | 2 | 3 | sepOn | endl; §\C{// separator at start of line}§4625 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // separator at start of line 4676 4626 \end{lstlisting} 4677 4627 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4679 4629 \end{lstlisting} 4680 4630 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4681 sout | 1 | sepOff | 2 | 3 | endl; §\C{// turn off implicit separator temporarily}§4631 sout | 1 | sepOff | 2 | 3 | endl; // turn off implicit separator temporarily 4682 4632 \end{lstlisting} 4683 4633 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4685 4635 \end{lstlisting} 4686 4636 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4687 sout | sepDisable | 1 | 2 | 3 | endl; §\C{// turn off implicit separation, affects all subsequent prints}§4637 sout | sepDisable | 1 | 2 | 3 | endl; // turn off implicit separation, affects all subsequent prints 4688 4638 \end{lstlisting} 4689 4639 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4691 4641 \end{lstlisting} 4692 4642 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4693 sout | 1 | sepOn | 2 | 3 | endl; §\C{// turn on implicit separator temporarily}§4643 sout | 1 | sepOn | 2 | 3 | endl; // turn on implicit separator temporarily 4694 4644 \end{lstlisting} 4695 4645 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4697 4647 \end{lstlisting} 4698 4648 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4699 sout | sepEnable | 1 | 2 | 3 | endl; §\C{// turn on implicit separation, affects all subsequent prints}§4649 sout | sepEnable | 1 | 2 | 3 | endl; // turn on implicit separation, affects all subsequent prints 4700 4650 \end{lstlisting} 4701 4651 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4703 4653 \end{lstlisting} 4704 4654 \begin{lstlisting}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt] 4705 sepSet( sout, ", $" ); §\C{// change separator from " " to ", \$"}§4655 sepSet( sout, ", $" ); // change separator from " " to ", $" 4706 4656 sout | 1 | 2 | 3 | endl; 4707 4657 \end{lstlisting}
Note:
See TracChangeset
for help on using the changeset viewer.