- Timestamp:
- Jun 30, 2023, 1:48:33 PM (2 years ago)
- Branches:
- master
- Children:
- 4bae7b4
- Parents:
- c9019ce (diff), 48ee593 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- doc/user
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user/Makefile
rc9019ce r599dc6a 68 68 -${BibTeX} ${Build}/${basename $@} 69 69 # Some citations reference others so run again to resolve these citations 70 #${LaTeX} ${basename $@}.tex71 -${BibTeX} ${Build}/${basename $@}70 ${LaTeX} ${basename $@}.tex 71 # -${BibTeX} ${Build}/${basename $@} 72 72 # Make index from *.aux entries and input index at end of document 73 73 makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx -
doc/user/user.tex
rc9019ce r599dc6a 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Mon Jun 5 21:18:29202314 %% Update Count : 55 2113 %% Last Modified On : Thu Jun 29 21:52:51 2023 14 %% Update Count : 5533 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 3981 3981 3982 3982 The following \Index{manipulator}s control \Index{implicit output separation}. 3983 The effect of these manipulators is global for an output stream (except ©sep On© and ©sepOff©).3983 The effect of these manipulators is global for an output stream (except ©sep© and ©nosep©). 3984 3984 \begin{enumerate} 3985 3985 \item 3986 \Indexc{sepSet}\index{manipulator!sepSet@©sepSet©} and \Indexc{sep }\index{manipulator!sep@©sep©}/\Indexc{sepGet}\index{manipulator!sepGet@©sepGet©} set and get the separator string.3986 \Indexc{sepSet}\index{manipulator!sepSet@©sepSet©} and \Indexc{sepVal}\index{manipulator!sepVal@©sepVal©}/\Indexc{sepGet}\index{manipulator!sepGet@©sepGet©} set and get the separator string. 3987 3987 The separator string can be at most 16 characters including the ©'\0'© string terminator (15 printable characters). 3988 3988 \begin{cfa}[belowskip=0pt] 3989 3989 sepSet( sout, ", $\LstStringStyle{\textdollar}$" ); $\C{// set separator from " " to ", \$"}$ 3990 sout | 1 | 2 | 3 | " \"" | ®sep ® | "\"";3990 sout | 1 | 2 | 3 | " \"" | ®sepVal® | "\""; 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] … … 4019 4019 4020 4020 \item 4021 \Indexc{sepSetTuple}\index{manipulator!sepSetTuple@©sepSetTuple©} and \Indexc{sepTuple }\index{manipulator!sepTuple@©sepTuple©}/\Indexc{sepGetTuple}\index{manipulator!sepGetTuple@©sepGetTuple©} get and set the tuple separator-string.4021 \Indexc{sepSetTuple}\index{manipulator!sepSetTuple@©sepSetTuple©} and \Indexc{sepTupleVal}\index{manipulator!sepTupleVal@©sepTupleVal©}/\Indexc{sepGetTuple}\index{manipulator!sepGetTuple@©sepGetTuple©} get and set the tuple separator-string. 4022 4022 The tuple separator-string can be at most 16 characters including the ©'\0'© string terminator (15 printable characters). 4023 4023 \begin{cfa}[belowskip=0pt] 4024 4024 sepSetTuple( sout, " " ); $\C{// set tuple separator from ", " to " "}$ 4025 sout | t1 | t2 | " \"" | ®sepTuple ® | "\"";4025 sout | t1 | t2 | " \"" | ®sepTupleVal® | "\""; 4026 4026 \end{cfa} 4027 4027 \begin{cfa}[showspaces=true,aboveskip=0pt] … … 4038 4038 4039 4039 \item 4040 \Indexc{sep Disable}\index{manipulator!sepDisable@©sepDisable©} and \Indexc{sepEnable}\index{manipulator!sepEnable@©sepEnable©} globally toggle printing the separator.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 | sepDisable| 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 | sepEnable| 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] … … 4053 4053 4054 4054 \item 4055 \Indexc{sep On}\index{manipulator!sepOn@©sepOn©} and \Indexc{sepOff}\index{manipulator!sepOff@©sepOff©} locally toggle printing the separator with respect to the next printed item, and then return to the global separator setting.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 | sepOff| 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 | sep Disable | 1 | sepOn| 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 | sepOff| 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] 4073 4073 1, 2, 34, 5, 6 4074 4074 \end{cfa} 4075 ©sep On© \emph{cannot} be used to start/end a line with a separator because separators do not appear at the start/end of a line;4075 ©sep© \emph{cannot} be used to start/end a line with a separator because separators do not appear at the start/end of a line; 4076 4076 use ©sep© to accomplish this functionality. 4077 4077 \begin{cfa}[belowskip=0pt] 4078 sout | sepOn | 1 | 2 | 3 | sepOn; $\C{// sepOndoes 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 … … 4373 4374 sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\""; 4374 4375 4375 sout | sep Disable| 1 | 2 | 3; // globally turn off implicit separator4376 sout | sep Enable| 1 | 2 | 3; // globally turn on implicit separator4377 4378 sout | 1 | sepOff| 2 | 3; // locally turn on implicit separator4379 sout | sep Disable | 1 | sepOn| 2 | 3; // globally turn off implicit separator4380 sout | sep Enable;4381 sout | t1 | sepOff| t2; // locally turn on/off implicit separator4382 4383 sout | sep On | 1 | 2 | 3 | sepOn ; // sepOndoes nothing at start/end of line4376 sout | sepOff | 1 | 2 | 3; // globally turn off implicit separator 4377 sout | sepOn | 1 | 2 | 3; // globally turn on implicit separator 4378 4379 sout | 1 | nosep | 2 | 3; // locally turn on implicit separator 4380 sout | sepOff | 1 | sep | 2 | 3; // globally turn off implicit separator 4381 sout | sepOn; 4382 sout | t1 | nosep | t2; // locally turn on/off implicit separator 4383 4384 sout | sep | 1 | 2 | 3 | sep ; // sep does nothing at start/end of line 4384 4385 sout | sep | 1 | 2 | 3 | sep ; // use sep to print separator at start/end of line 4385 4386 } … … 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.