- Timestamp:
- May 3, 2026, 10:18:08 AM (12 hours ago)
- Branches:
- master
- Parents:
- 2fd3de7
- File:
-
- 1 edited
-
doc/user/user.tex (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/user/user.tex
r2fd3de7 r8403b32 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Fri Mar 20 08:05:59202614 %% Update Count : 7 39913 %% Last Modified On : Sun May 3 10:13:13 2026 14 %% Update Count : 7425 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 5382 5382 \begin{enumerate} 5383 5383 \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©. 5385 5385 \begin{cfa}[belowskip=0pt] 5386 5386 sout | bin( 0 ) | bin( 27HH ) | bin( 27H ) | bin( 27 ) | bin( 27L ); … … 5388 5388 sout | bin( -27HH ) | bin( -27H ) | bin( -27 ) | bin( -27L ); 5389 5389 0b11100101 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©. 5390 sout | bin( 'A' ) | "|" | bin( "abd" ) | "|" | bin( (string){ "@#!" } ); 5391 0b1000001 | 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©. 5394 5396 \begin{cfa}[belowskip=0pt] 5395 5397 sout | oct( 0 ) | oct( 27HH ) | oct( 27H ) | oct( 27 ) | oct( 27L ); … … 5397 5399 sout | oct( -27HH ) | oct( -27H ) | oct( -27 ) | oct( -27L ); 5398 5400 0345 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©. 5401 sout | oct( 'A' ) | "|" | oct( "abd" ) | "|" | oct( (string){ "@#!" } ); 5402 0101 | 0141 0142 0144 | 0100 043 041 5403 \end{cfa} 5404 Note, 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©. 5404 5408 \begin{cfa}[belowskip=0pt] 5405 5409 sout | hex( 0 ) | hex( 27HH ) | hex( 27H ) | hex( 27 ) | hex( 27L ); … … 5407 5411 sout | hex( -27HH ) | hex( -27H ) | hex( -27 ) | hex( -27L ); 5408 5412 0xe5 0xffe5 0xffffffe5 0xffffffffffffffe5 5409 5410 5413 sout | hex( 0.0 ) | hex( 27.5F ) | hex( 27.5 ) | hex( 27.5L ); 5411 5414 0x0p+0 0x1.b8p+4 0x1.b8p+4 0xd.cp+1 5412 5415 sout | hex( -27.5F ) | hex( -27.5 ) | hex( -27.5L ); 5413 5416 -0x1.b8p+4 -0x1.b8p+4 -0xd.cp+1 5417 sout | hex( 'A' ) | "|" | hex( "abd" ) | "|" | hex( (string){ "@#!" } ); 5418 0x41 | 0x61 0x62 0x64 | 0x40 0x23 0x21 5414 5419 \end{cfa} 5415 5420 … … 5441 5446 5442 5447 \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. 5444 5449 \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©.5450 sout | upcase( bin( 27 ) ) | upcase( hex( 27 ) ) | upcase( 27.5e-10 ) | upcase( hex( 27.5 ) ) | upcase( hex( 'W' ) ); 5451 0®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©. 5451 5456 Printing the base is the default. 5452 5457 \begin{cfa}[belowskip=0pt] 5453 sout | nobase( bin( 27) ) | nobase( oct( 27 ) ) | nobase( hex( 27 ) );5454 1 1011 33 1b5458 sout | nobase( bin( 'W' ) ) | nobase( oct( 27 ) ) | nobase( hex( 27 ) ); 5459 1010111 33 1b 5455 5460 \end{cfa} 5456 5461 … … 5461 5466 sout | 0. | nodp( 0. ) | 27.0 | nodp( 27.0 ) | nodp( 27.5 ); 5462 5467 0.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. 5472 No quotes is the default. 5473 \begin{cfa}[belowskip=0pt] 5474 sout | quote( 'A' ) | quote( "abd" ) | quote( (string){ "@#!" } ); 5475 'A'"abd" "@#!" 5463 5476 \end{cfa} 5464 5477
Note:
See TracChangeset
for help on using the changeset viewer.