Changes in doc/user/user.tex [6587f9d:795500c3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user/user.tex
r6587f9d r795500c3 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Thu Jun 29 11:53:10202314 %% Update Count : 55 2313 %% Last Modified On : Thu Jun 29 21:52:51 2023 14 %% Update Count : 5533 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 3991 3991 \end{cfa} 3992 3992 \begin{cfa}[showspaces=true,aboveskip=0pt] 3993 1®, $\ LstStringStyle{\textdollar}$®2®, $\LstStringStyle{\textdollar}$®3 ®", $\LstStringStyle{\textdollar}$"®3993 1®, $\color{red}\LstStringStyle{\textdollar}$®2®, $\color{red}\LstStringStyle{\textdollar}$®3 ®", $\color{red}\LstStringStyle{\textdollar}$"® 3994 3994 \end{cfa} 3995 3995 \begin{cfa}[belowskip=0pt] … … 4040 4040 \Indexc{sepOff}\index{manipulator!sepOff@©sepOff©} and \Indexc{sepOn}\index{manipulator!sepOn@©sepOn©} globally toggle printing the separator. 4041 4041 \begin{cfa}[belowskip=0pt] 4042 sout | sepOff| 1 | 2 | 3; $\C{// turn off implicit separator}$4042 sout | ®sepOff® | 1 | 2 | 3; $\C{// turn off implicit separator}$ 4043 4043 \end{cfa} 4044 4044 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4046 4046 \end{cfa} 4047 4047 \begin{cfa}[belowskip=0pt] 4048 sout | sepOn| 1 | 2 | 3; $\C{// turn on implicit separator}$4048 sout | ®sepOn® | 1 | 2 | 3; $\C{// turn on implicit separator}$ 4049 4049 \end{cfa} 4050 4050 \begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4055 4055 \Indexc{sep}\index{manipulator!sep@©sep©} and \Indexc{nosep}\index{manipulator!nosep@©nosep©} locally toggle printing the separator with respect to the next printed item, and then return to the global separator setting. 4056 4056 \begin{cfa}[belowskip=0pt] 4057 sout | 1 | nosep| 2 | 3; $\C{// turn off implicit separator for the next item}$4057 sout | 1 | ®nosep® | 2 | 3; $\C{// turn off implicit separator for the next item}$ 4058 4058 \end{cfa} 4059 4059 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4061 4061 \end{cfa} 4062 4062 \begin{cfa}[belowskip=0pt] 4063 sout | sepOff | 1 | sep| 2 | 3; $\C{// turn on implicit separator for the next item}$4063 sout | sepOff | 1 | ®sep® | 2 | 3; $\C{// turn on implicit separator for the next item}$ 4064 4064 \end{cfa} 4065 4065 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4068 4068 The tuple separator also responses to being turned on and off. 4069 4069 \begin{cfa}[belowskip=0pt] 4070 sout | t1 | nosep| t2; $\C{// turn off implicit separator for the next item}$4070 sout | t1 | ®nosep® | t2; $\C{// turn off implicit separator for the next item}$ 4071 4071 \end{cfa} 4072 4072 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4076 4076 use ©sep© to accomplish this functionality. 4077 4077 \begin{cfa}[belowskip=0pt] 4078 sout | sep | 1 | 2 | 3 | sep; $\C{// sep does nothing at start/end of line}$4078 sout | ®sep® | 1 | 2 | 3 | ®sep®; $\C{// sep does nothing at start/end of line}$ 4079 4079 \end{cfa} 4080 4080 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4082 4082 \end{cfa} 4083 4083 \begin{cfa}[belowskip=0pt] 4084 sout | sep | 1 | 2 | 3 | sep ; $\C{// use septo print separator at start/end of line}$4084 sout | ®sepVal® | 1 | 2 | 3 | ®sepVal® ; $\C{// use sepVal to print separator at start/end of line}$ 4085 4085 \end{cfa} 4086 4086 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4116 4116 \Indexc{nl}\index{manipulator!nl@©nl©} inserts a newline. 4117 4117 \begin{cfa} 4118 sout | nl; $\C{// only print newline}$4118 sout | ®nl®; $\C{// only print newline}$ 4119 4119 sout | 2; $\C{// implicit newline}$ 4120 sout | 3 | nl | 4 | nl; $\C{// terminating nl merged with implicit newline}$4121 sout | 5 | nl | nl; $\C{// again terminating nl merged with implicit newline}$4120 sout | 3 | ®nl® | 4 | ®nl®; $\C{// terminating nl merged with implicit newline}$ 4121 sout | 5 | ®nl® | ®nl®; $\C{// again terminating nl merged with implicit newline}$ 4122 4122 sout | 6; $\C{// implicit newline}$ 4123 4123 … … 4286 4286 For the C-string type, precision is the maximum number of printed characters, so the string is truncated if it exceeds the maximum. 4287 4287 \begin{cfa}[belowskip=0pt] 4288 sout | wd( 6,8, "abcd" ) | wd( 6,8, "abcdefghijk" ) | wd( 6,3, "abcd" ) ;4288 sout | wd( 6,8, "abcd" ) | wd( 6,8, "abcdefghijk" ) | wd( 6,3, "abcd" ) | ®wd( 10, "" )® | 'X'; 4289 4289 \end{cfa} 4290 4290 \begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt] 4291 abcd abcdefgh abc 4292 \end{cfa} 4291 abcd abcdefgh abc® ®X 4292 \end{cfa} 4293 Note, printing the null string with minimum width L pads with L spaces. 4293 4294 4294 4295 \item … … 4692 4693 sout | i | j | k | x | y | s; 4693 4694 } 4694 4695 \end{cfa} 4696 \begin{cfa}[showspaces=true] 4695 4697 3 0x5 7 1.234568e+07 987.654n abc 4696 4698 3 0x5 7 1.234568e+07 987.654n abc
Note: See TracChangeset
for help on using the changeset viewer.