Changeset 6587f9d
- Timestamp:
- Jun 29, 2023, 12:13:51 PM (22 months ago)
- Branches:
- master
- Children:
- 3d70ca9
- Parents:
- 85a3806
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified doc/user/user.tex ¶
r85a3806 r6587f9d 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 : 552 113 %% Last Modified On : Thu Jun 29 11:53:10 2023 14 %% Update Count : 5523 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] … … 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 | sep Disable| 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 | sep Enable| 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 | sep On | 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] … … 4373 4373 sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\""; 4374 4374 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 line4375 sout | sepOff | 1 | 2 | 3; // globally turn off implicit separator 4376 sout | sepOn | 1 | 2 | 3; // globally turn on implicit separator 4377 4378 sout | 1 | nosep | 2 | 3; // locally turn on implicit separator 4379 sout | sepOff | 1 | sep | 2 | 3; // globally turn off implicit separator 4380 sout | sepOn; 4381 sout | t1 | nosep | t2; // locally turn on/off implicit separator 4382 4383 sout | sep | 1 | 2 | 3 | sep ; // sep does nothing at start/end of line 4384 4384 sout | sep | 1 | 2 | 3 | sep ; // use sep to print separator at start/end of line 4385 4385 }
Note: See TracChangeset
for help on using the changeset viewer.