Changeset 8403b32


Ignore:
Timestamp:
May 3, 2026, 10:18:08 AM (5 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Parents:
2fd3de7
Message:

update user documentation with new quote manipulator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    r2fd3de7 r8403b32  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Fri Mar 20 08:05:59 2026
    14 %% Update Count     : 7399
     13%% Last Modified On : Sun May  3 10:13:13 2026
     14%% Update Count     : 7425
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    53825382\begin{enumerate}
    53835383\item
    5384 \Indexc{bin}( integer )\index{manipulator!bin@©bin©} print value in base 2 preceded by ©0b©/©0B©.
     5384\Indexc{bin}( integer / character / string )\index{manipulator!bin@©bin©} print value in base 2 preceded by ©0b©/©0B©.
    53855385\begin{cfa}[belowskip=0pt]
    53865386sout | bin( 0 ) | bin( 27HH ) | bin( 27H ) | bin( 27 ) | bin( 27L );
     
    53885388sout | bin( -27HH ) | bin( -27H ) | bin( -27 ) | bin( -27L );
    538953890b11100101 0b1111111111100101 0b11111111111111111111111111100101 0b®(58 1s)®100101
    5390 \end{cfa}
    5391 
    5392 \item
    5393 \Indexc{oct}( integer )\index{manipulator!oct@©oct©} print value in base 8 preceded by ©0©.
     5390sout | bin( 'A' ) | "|" |  bin( "abd" ) | "|" | bin( (string){ "@#!" } );
     53910b1000001 | 0b1100001 0b1100010 0b1100100 | 0b1000000 0b100011 0b100001
     5392\end{cfa}
     5393
     5394\item
     5395\Indexc{oct}( integer / character / string )\index{manipulator!oct@©oct©} print value in base 8 preceded by ©0©.
    53945396\begin{cfa}[belowskip=0pt]
    53955397sout | oct( 0 ) | oct( 27HH ) | oct( 27H ) | oct( 27 ) | oct( 27L );
     
    53975399sout | oct( -27HH ) | oct( -27H ) | oct( -27 ) | oct( -27L );
    539854000345 0177745 037777777745 01777777777777777777745
    5399 \end{cfa}
    5400 Note, octal 0 is \emph{not} preceded by ©0© to prevent confusion.
    5401 
    5402 \item
    5403 \Indexc{hex}( integer / floating-point )\index{manipulator!hex@©hex©} print value in base 16 preceded by ©0x©/©0X©.
     5401sout | oct( 'A' ) | "|" |  oct( "abd" ) | "|" | oct( (string){ "@#!" } );
     54020101 | 0141 0142 0144 | 0100 043 041
     5403\end{cfa}
     5404Note, octal ©0© is \emph{not} preceded by ©0© to prevent confusion.
     5405
     5406\item
     5407\Indexc{hex}( integer / floating-point  / character / string )\index{manipulator!hex@©hex©} print value in base 16 preceded by ©0x©/©0X©.
    54045408\begin{cfa}[belowskip=0pt]
    54055409sout | hex( 0 ) | hex( 27HH ) | hex( 27H ) | hex( 27 ) | hex( 27L );
     
    54075411sout | hex( -27HH ) | hex( -27H ) | hex( -27 ) | hex( -27L );
    540854120xe5 0xffe5 0xffffffe5 0xffffffffffffffe5
    5409 
    54105413sout | hex( 0.0 ) | hex( 27.5F ) | hex( 27.5 ) | hex( 27.5L );
    541154140x0p+0 0x1.b8p+4 0x1.b8p+4 0xd.cp+1
    54125415sout | hex( -27.5F ) | hex( -27.5 ) | hex( -27.5L );
    54135416-0x1.b8p+4 -0x1.b8p+4 -0xd.cp+1
     5417sout | hex( 'A' ) | "|" |  hex( "abd" ) | "|" | hex( (string){ "@#!" } );
     54180x41 | 0x61 0x62 0x64 | 0x40 0x23 0x21
    54145419\end{cfa}
    54155420
     
    54415446
    54425447\item
    5443 \Indexc{upcase}( bin / hex / floating-point )\index{manipulator!upcase@©upcase©} print letters in a value in upper case. Lower case is the default.
     5448\Indexc{upcase}( bin / hex )\index{manipulator!upcase@©upcase©} print letters in a value in upper case. Lower case is the default.
    54445449\begin{cfa}[belowskip=0pt]
    5445 sout | upcase( bin( 27 ) ) | upcase( hex( 27 ) ) | upcase( 27.5e-10 ) | upcase( hex( 27.5 ) );
    5446 0®B®11011 0®X®1®B® 2.75®E®-09 0®X®1.®B®8®P®+4
    5447 \end{cfa}
    5448 
    5449 \item
    5450 \Indexc{nobase}( integer )\index{manipulator!nobase@©nobase©} do not precede ©bin©, ©oct©, ©hex© with ©0b©/©0B©, ©0©, or ©0x©/©0X©.
     5450sout | upcase( bin( 27 ) ) | upcase( hex( 27 ) ) | upcase( 27.5e-10 ) | upcase( hex( 27.5 ) ) | upcase( hex( 'W' ) );
     54510®B®11011 0®X®1®B® 2.75®E®-09 0®X®1.®B®8®P®+4 0®X®57
     5452\end{cfa}
     5453
     5454\item
     5455\Indexc{nobase}( bin / oct / hex (not floating-point) )\index{manipulator!nobase@©nobase©} do not precede ©bin©, ©oct©, ©hex© with ©0b©/©0B©, ©0©, or ©0x©/©0X©.
    54515456Printing the base is the default.
    54525457\begin{cfa}[belowskip=0pt]
    5453 sout | nobase( bin( 27 ) ) | nobase( oct( 27 ) ) | nobase( hex( 27 ) );
    5454 11011 33 1b
     5458sout | nobase( bin( 'W' ) ) | nobase( oct( 27 ) ) | nobase( hex( 27 ) );
     54591010111 33 1b
    54555460\end{cfa}
    54565461
     
    54615466sout | 0. | nodp( 0. ) | 27.0 | nodp( 27.0 ) | nodp( 27.5 );
    546254670.0 ®0® 27.0 ®27® 27.5
     5468\end{cfa}
     5469
     5470\item
     5471\Indexc{quote}( character / string) )\index{manipulator!quote@©quote©} bracket text with appropriate quote characters.
     5472No quotes is the default.
     5473\begin{cfa}[belowskip=0pt]
     5474sout | quote( 'A' ) | quote( "abd" ) | quote( (string){ "@#!" } );
     5475'A'"abd" "@#!"
    54635476\end{cfa}
    54645477
Note: See TracChangeset for help on using the changeset viewer.