Changeset e99e43f for doc/user/user.tex


Ignore:
Timestamp:
Jan 10, 2019, 3:50:34 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
d97c3a4
Parents:
aeb8f70 (diff), 08222c7 (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.
git-author:
Aaron Moss <a3moss@…> (01/10/19 14:46:09)
git-committer:
Aaron Moss <a3moss@…> (01/10/19 15:50:34)
Message:

Merge remote-tracking branch 'plg/master' into deferred_resn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    raeb8f70 re99e43f  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Fri Aug 31 07:54:50 2018
    14 %% Update Count     : 3396
     13%% Last Modified On : Tue Dec 11 23:19:26 2018
     14%% Update Count     : 3400
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    178178int main( void ) {
    179179        int x = 0, y = 1, z = 2;
    180         ®sout | x | y | z | endl;®§\indexc{sout}§
     180        ®sout | x | y | z;®§\indexc{sout}§
    181181}
    182182\end{cfa}
     
    513513Floating exponentiation\index{exponentiation!floating} is performed using \Index{logarithm}s\index{exponentiation!logarithm}, so the base cannot be negative.
    514514\begin{cfa}
    515 sout | 2 ®\® 8u | 4 ®\® 3u | -4 ®\® 3u | 4 ®\® -3 | -4 ®\® -3 | 4.0 ®\® 2.1 | (1.0f+2.0fi) ®\® (3.0f+2.0fi) | endl;
     515sout | 2 ®\® 8u | 4 ®\® 3u | -4 ®\® 3u | 4 ®\® -3 | -4 ®\® -3 | 4.0 ®\® 2.1 | (1.0f+2.0fi) ®\® (3.0f+2.0fi);
    516516256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
    517517\end{cfa}
     
    547547
    548548
    549 %\subsection{\texorpdfstring{\protect\lstinline@for@ Statement}{for Statement}}
    550 \subsection{\texorpdfstring{\LstKeywordStyle{for} Statement}{for Statement}}
     549\subsection{Loop Control}
    551550
    552551The ©for©/©while©/©do-while© loop-control allows empty or simplified ranges.
     
    557556the down-to range ©-~=©\index{-~=@©-~=©} means inclusive range [N,M].
    558557©0© is the implicit start value;
    559 ©1© is the implicit increment value for an up-to range and ©-1© for an implicit down-to range.
     558©1© is the implicit increment value.
     559The up-to range uses ©+=© for increment;
     560the down-to range uses ©-=© for decrement.
    560561The loop index is polymorphic in the type of the start value or comparison value when start is implicitly ©0©.
    561562\begin{cquote}
    562563\begin{tabular}{@{}ll|l@{}}
    563 \multicolumn{2}{c|}{for control} & \multicolumn{1}{c}{output} \\
     564\multicolumn{2}{c|}{loop control} & \multicolumn{1}{c}{output} \\
    564565\hline
    565566\begin{cfa}
     
    571572for ( ®10® ) { sout | "A"; }
    572573for ( ®1 ~= 10 ~ 2® ) { sout | "B"; }
    573 for ( ®10 -~= 1 ~ -2® ) { sout | "C"; }
     574for ( ®10 -~= 1 ~ 2® ) { sout | "C"; }
    574575for ( ®0.5 ~ 5.5® ) { sout | "D"; }
    575576for ( ®5.5 -~ 0.5® ) { sout | "E"; }
    576577for ( ®i; 10® ) { sout | i; }
    577578for ( ®i; 1 ~= 10 ~ 2® ) { sout | i; }
    578 for ( ®i; 10 -~= 1 ~ -2® ) { sout | i; }
     579for ( ®i; 10 -~= 1 ~ 2® ) { sout | i; }
    579580for ( ®i; 0.5 ~ 5.5® ) { sout | i; }
    580581for ( ®i; 5.5 -~ 0.5® ) { sout | i; }
    581582for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; }
    582 for ( ®ui; 10u -~= 2u ~ -2u® ) { sout | ui; }
    583 int start = 3, comp = 10, inc = 2;
     583for ( ®ui; 10u -~= 2u ~ 2u® ) { sout | ui; }
     584enum { N = 10 };
     585for ( ®N® ) { sout | "N"; }
     586for ( ®i; N® ) { sout | i; }
     587for ( ®i; N -~ 0® ) { sout | i; }
     588const int start = 3, comp = 10, inc = 2;
    584589for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; }
    585590\end{cfa}
    586591&
    587592\begin{cfa}
    588 sout | endl;
    589 sout | endl;
    590 sout | endl;
    591 sout | endl;
    592 sout | endl;
    593 sout | endl;
    594 sout | endl;
    595 sout | endl;
    596 sout | endl;
    597 sout | endl;
    598 sout | endl;
    599 sout | endl;
    600 sout | endl;
    601 sout | endl;
    602 sout | endl;
    603 sout | endl;
    604 sout | endl;
    605 
    606 sout | endl;
     593sout | nl;
     594sout | nl;
     595sout | nl;
     596sout | "zero" | nl;
     597sout | nl;
     598sout | nl;
     599sout | nl;
     600sout | nl;
     601sout | nl;
     602sout | nl;
     603sout | nl;
     604sout | nl;
     605sout | nl;
     606sout | nl;
     607sout | nl;
     608sout | nl;
     609sout | nl | nl;
     610
     611sout | nl;
     612sout | nl;
     613sout | nl | nl;
     614
     615sout | nl;
    607616\end{cfa}
    608617&
     
    611620empty
    612621empty
    613 
     622zero
    614623A
    615624A A A A A A A A A A
     
    6256342 4 6 8 10
    62663510 8 6 4 2
     636
     637N N N N N N N N N N
     6380 1 2 3 4 5 6 7 8 9
     63910 9 8 7 6 5 4 3 2 1
    627640
    6286413 6 9
     
    24462459        int bar( int p ) {
    24472460                ®i® += 1;                               §\C{// dependent on local variable}§
    2448                 sout | ®i® | endl;
     2461                sout | ®i®;
    24492462        }
    24502463        return bar;                                     §\C{// undefined because of local dependence}§
     
    24522465int main() {
    24532466        * [int]( int ) fp = foo();      §\C{// int (* fp)( int )}§
    2454         sout | fp( 3 ) | endl;
     2467        sout | fp( 3 );
    24552468}
    24562469\end{cfa}
     
    32183231\begin{cfa}
    32193232int x = 1, y = 2, z = 3;
    3220 sout | x ®|® y ®|® z | endl;
     3233sout | x ®|® y ®|® z;
    32213234\end{cfa}
    32223235&
     
    32393252\begin{cfa}
    32403253[int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ];
    3241 sout | t1 | t2 | endl;                                  §\C{// print tuples}§
     3254sout | t1 | t2;                                         §\C{// print tuples}§
    32423255\end{cfa}
    32433256\begin{cfa}[showspaces=true,aboveskip=0pt]
     
    32513264&
    32523265\begin{cfa}
    3253 sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;
     3266sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2);
    32543267\end{cfa}
    32553268\\
     
    32773290A separator does not appear at the start or end of a line.
    32783291\begin{cfa}[belowskip=0pt]
    3279 sout | 1 | 2 | 3 | endl;
     3292sout | 1 | 2 | 3;
    32803293\end{cfa}
    32813294\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    32863299A separator does not appear before or after a character literal or variable.
    32873300\begin{cfa}
    3288 sout | '1' | '2' | '3' | endl;
     3301sout | '1' | '2' | '3';
    32893302123
    32903303\end{cfa}
     
    32933306A separator does not appear before or after a null (empty) C string.
    32943307\begin{cfa}
    3295 sout | 1 | "" | 2 | "" | 3 | endl;
     3308sout | 1 | "" | 2 | "" | 3;
    32963309123
    32973310\end{cfa}
     
    33033316\begin{cfa}[mathescape=off]
    33043317sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x =" | 4 | "x $" | 5 | "x £" | 6 | "x ¥"
    3305                 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10 | endl;
     3318                | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10;
    33063319\end{cfa}
    33073320%$
     
    33173330\begin{cfa}[belowskip=0pt]
    33183331sout | 1 | ", x" | 2 | ". x" | 3 | "; x" | 4 | "! x" | 5 | "? x" | 6 | "% x"
    3319                 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;
     3332                | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x";
    33203333\end{cfa}
    33213334\begin{cfa}[basicstyle=\tt,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    33273340A seperator does not appear before or after a C string begining/ending with the \Index*{ASCII} quote or whitespace characters: \lstinline[basicstyle=\tt,showspaces=true]@`'": \t\v\f\r\n@
    33283341\begin{cfa}[belowskip=0pt]
    3329 sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;
     3342sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx";
    33303343\end{cfa}
    33313344\begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt]
     
    33363349If a space is desired before or after one of the special string start/end characters, simply insert a space.
    33373350\begin{cfa}[belowskip=0pt]
    3338 sout | "x (§\color{red}\texttt{\textvisiblespace}§" | 1 | "§\color{red}\texttt{\textvisiblespace}§) x" | 2 | "§\color{red}\texttt{\textvisiblespace}§, x" | 3 | "§\color{red}\texttt{\textvisiblespace}§:x:§\color{red}\texttt{\textvisiblespace}§" | 4 | endl;
     3351sout | "x (§\color{red}\texttt{\textvisiblespace}§" | 1 | "§\color{red}\texttt{\textvisiblespace}§) x" | 2 | "§\color{red}\texttt{\textvisiblespace}§, x" | 3 | "§\color{red}\texttt{\textvisiblespace}§:x:§\color{red}\texttt{\textvisiblespace}§" | 4;
    33393352\end{cfa}
    33403353\begin{cfa}[basicstyle=\tt,showspaces=true,showtabs=true,aboveskip=0pt,belowskip=0pt]
     
    33533366\begin{cfa}[mathescape=off,belowskip=0pt]
    33543367sepSet( sout, ", $" );                                          §\C{// set separator from " " to ", \$"}§
    3355 sout | 1 | 2 | 3 | " \"" | ®sep® | "\"" | endl;
     3368sout | 1 | 2 | 3 | " \"" | ®sep® | "\"";
    33563369\end{cfa}
    33573370%$
     
    33623375\begin{cfa}[belowskip=0pt]
    33633376sepSet( sout, " " );                                            §\C{// reset separator to " "}§
    3364 sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\"" | endl;
     3377sout | 1 | 2 | 3 | " \"" | ®sepGet( sout )® | "\"";
    33653378\end{cfa}
    33663379\begin{cfa}[showspaces=true,aboveskip=0pt]
     
    33723385strcpy( store, sepGet( sout ) );                          §\C{// copy current separator}§
    33733386sepSet( sout, "_" );                                            §\C{// change separator to underscore}§
    3374 sout | 1 | 2 | 3 | endl;
     3387sout | 1 | 2 | 3;
    33753388\end{cfa}
    33763389\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    33793392\begin{cfa}[belowskip=0pt]
    33803393sepSet( sout, store );                                          §\C{// change separator back to original}§
    3381 sout | 1 | 2 | 3 | endl;
     3394sout | 1 | 2 | 3;
    33823395\end{cfa}
    33833396\begin{cfa}[showspaces=true,aboveskip=0pt]
     
    33903403\begin{cfa}[belowskip=0pt]
    33913404sepSetTuple( sout, " " );                                       §\C{// set tuple separator from ", " to " "}§
    3392 sout | t1 | t2 | " \"" | ®sepTuple® | "\"" | endl;
     3405sout | t1 | t2 | " \"" | ®sepTuple® | "\"";
    33933406\end{cfa}
    33943407\begin{cfa}[showspaces=true,aboveskip=0pt]
     
    33973410\begin{cfa}[belowskip=0pt]
    33983411sepSetTuple( sout, ", " );                                      §\C{// reset tuple separator to ", "}§
    3399 sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\"" | endl;
     3412sout | t1 | t2 | " \"" | ®sepGetTuple( sout )® | "\"";
    34003413\end{cfa}
    34013414\begin{cfa}[showspaces=true,aboveskip=0pt]
     
    34073420Manipulators \Indexc{sepDisable}\index{manipulator!sepDisable@©sepDisable©} and \Indexc{sepEnable}\index{manipulator!sepEnable@©sepEnable©} \emph{globally} toggle printing the separator, \ie the seperator is adjusted with respect to all subsequent printed items.
    34083421\begin{cfa}[belowskip=0pt]
    3409 sout | sepDisable | 1 | 2 | 3 | endl;           §\C{// globally turn off implicit separator}§
     3422sout | sepDisable | 1 | 2 | 3                §\C{// globally turn off implicit separator}§
    34103423\end{cfa}
    34113424\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34133426\end{cfa}
    34143427\begin{cfa}[belowskip=0pt]
    3415 sout | sepEnable | 1 | 2 | 3 | endl;            §\C{// globally turn on implicit separator}§
     3428sout | sepEnable | 1 | 2 | 3;           §\C{// globally turn on implicit separator}§
    34163429\end{cfa}
    34173430\begin{cfa}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34223435Manipulators \Indexc{sepOn}\index{manipulator!sepOn@©sepOn©} and \Indexc{sepOff}\index{manipulator!sepOff@©sepOff©} \emph{locally} toggle printing the separator, \ie the seperator is adjusted only with respect to the next printed item.
    34233436\begin{cfa}[belowskip=0pt]
    3424 sout | 1 | sepOff | 2 | 3 | endl;                       §\C{// locally turn off implicit separator}§
     3437sout | 1 | sepOff | 2 | 3;                      §\C{// locally turn off implicit separator}§
    34253438\end{cfa}
    34263439\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34283441\end{cfa}
    34293442\begin{cfa}[belowskip=0pt]
    3430 sout | sepDisable | 1 | sepOn | 2 | 3 | endl; §\C{// locally turn on implicit separator}§
     3443sout | sepDisable | 1 | sepOn | 2 | 3; §\C{// locally turn on implicit separator}§
    34313444\end{cfa}
    34323445\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34353448The tuple separator also responses to being turned on and off.
    34363449\begin{cfa}[belowskip=0pt]
    3437 sout | t1 | sepOff | t2 | endl;                         §\C{// locally turn on/off implicit separator}§
     3450sout | t1 | sepOff | t2;                                §\C{// locally turn on/off implicit separator}§
    34383451\end{cfa}
    34393452\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34433456use ©sep© to accomplish this functionality.
    34443457\begin{cfa}[belowskip=0pt]
    3445 sout | sepOn | 1 | 2 | 3 | sepOn | endl ;       §\C{// sepOn does nothing at start/end of line}§
     3458sout | sepOn | 1 | 2 | 3 | sepOn;       §\C{// sepOn does nothing at start/end of line}§
    34463459\end{cfa}
    34473460\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34493462\end{cfa}
    34503463\begin{cfa}[belowskip=0pt]
    3451 sout | sep | 1 | 2 | 3 | sep | endl ;           §\C{// use sep to print separator at start/end of line}§
     3464sout | sep | 1 | 2 | 3 | sep ;          §\C{// use sep to print separator at start/end of line}§
    34523465\end{cfa}
    34533466\begin{cfa}[showspaces=true,aboveskip=0pt,belowskip=0pt]
     
    34623475int main( void ) {
    34633476        int x = 1, y = 2, z = 3;
    3464         sout | x | y | z | endl;
     3477        sout | x | y | z;
    34653478        [int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 4, [ 5, 6 ] ];
    3466         sout | t1 | t2 | endl;                                          // print tuples
    3467         sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2) | endl;
    3468         sout | 1 | 2 | 3 | endl;
    3469         sout | '1' | '2' | '3' | endl;
    3470         sout | 1 | "" | 2 | "" | 3 | endl;
     3479        sout | t1 | t2;                                         // print tuples
     3480        sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2);
     3481        sout | 1 | 2 | 3;
     3482        sout | '1' | '2' | '3';
     3483        sout | 1 | "" | 2 | "" | 3;
    34713484        sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x =" | 4 | "x $" | 5 | "x £" | 6 | "x ¥"
    3472                 | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10 | endl;
     3485                | 7 | "x ¡" | 8 | "x ¿" | 9 | "x «" | 10;
    34733486        sout | 1 | ", x" | 2 | ". x" | 3 | "; x" | 4 | "! x" | 5 | "? x" | 6 | "% x"
    3474                 | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x" | endl;
    3475         sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx" | endl;
    3476         sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl;
     3487                | 7 | "¢ x" | 8 | "» x" | 9 | ") x" | 10 | "] x" | 11 | "} x";
     3488        sout | "x`" | 1 | "`x'" | 2 | "'x\"" | 3 | "\"x:" | 4 | ":x " | 5 | " x\t" | 6 | "\tx";
     3489        sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4;
    34773490
    34783491        sepSet( sout, ", $" );                                          // set separator from " " to ", $"
    3479         sout | 1 | 2 | 3 | " \"" | sep | "\"" | endl;
     3492        sout | 1 | 2 | 3 | " \"" | sep | "\"";
    34803493        sepSet( sout, " " );                                            // reset separator to " "
    3481         sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
     3494        sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"";
    34823495
    34833496        char store[sepSize];
    34843497        strcpy( store, sepGet( sout ) );
    34853498        sepSet( sout, "_" );
    3486         sout | 1 | 2 | 3 | endl;
     3499        sout | 1 | 2 | 3;
    34873500        sepSet( sout, store );
    3488         sout | 1 | 2 | 3 | endl;
     3501        sout | 1 | 2 | 3;
    34893502
    34903503        sepSetTuple( sout, " " );                                       // set tuple separator from ", " to " "
    3491         sout | t1 | t2 | " \"" | sepTuple | "\"" | endl;
     3504        sout | t1 | t2 | " \"" | sepTuple | "\"";
    34923505        sepSetTuple( sout, ", " );                                      // reset tuple separator to ", "
    3493         sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;
    3494 
    3495         sout | sepDisable | 1 | 2 | 3 | endl;           // globally turn off implicit separator
    3496         sout | sepEnable | 1 | 2 | 3 | endl;            // globally turn on implicit separator
    3497 
    3498         sout | 1 | sepOff | 2 | 3 | endl;                       // locally turn on implicit separator
    3499         sout | sepDisable | 1 | sepOn | 2 | 3 | endl; // globally turn off implicit separator
     3506        sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"";
     3507
     3508        sout | sepDisable | 1 | 2 | 3;          // globally turn off implicit separator
     3509        sout | sepEnable | 1 | 2 | 3;           // globally turn on implicit separator
     3510
     3511        sout | 1 | sepOff | 2 | 3;                      // locally turn on implicit separator
     3512        sout | sepDisable | 1 | sepOn | 2 | 3; // globally turn off implicit separator
    35003513        sout | sepEnable;
    3501         sout | t1 | sepOff | t2 | endl;                         // locally turn on/off implicit separator
    3502 
    3503         sout | sepOn | 1 | 2 | 3 | sepOn | endl ;       // sepOn does nothing at start/end of line
    3504         sout | sep | 1 | 2 | 3 | sep | endl ;           // use sep to print separator at start/end of line
     3514        sout | t1 | sepOff | t2;                                // locally turn on/off implicit separator
     3515
     3516        sout | sepOn | 1 | 2 | 3 | sepOn ;      // sepOn does nothing at start/end of line
     3517        sout | sep | 1 | 2 | 3 | sep ;          // use sep to print separator at start/end of line
    35053518}
    35063519
     
    41674180        Fibonacci f1, f2;
    41684181        for ( int i = 1; i <= 10; i += 1 ) {
    4169                 sout | next( &f1 ) | ' ' | next( &f2 ) | endl;
     4182                sout | next( &f1 ) | ' ' | next( &f2 );
    41704183        } // for
    41714184}
     
    42334246                MyThread f[4];
    42344247        }
    4235         sout | global.value | endl;
     4248        sout | global.value;
    42364249}
    42374250\end{cfa}
     
    43114324void main( First * this ) {
    43124325        for ( int i = 0; i < 10; i += 1 ) {
    4313                 sout | "First : Suspend No." | i + 1 | endl;
     4326                sout | "First : Suspend No." | i + 1;
    43144327                yield();
    43154328        }
     
    43204333        wait( this->lock );
    43214334        for ( int i = 0; i < 10; i += 1 ) {
    4322                 sout | "Second : Suspend No." | i + 1 | endl;
     4335                sout | "Second : Suspend No." | i + 1;
    43234336                yield();
    43244337        }
     
    43274340int main( void ) {
    43284341        signal_once lock;
    4329         sout | "User main begin" | endl;
     4342        sout | "User main begin";
    43304343        {
    43314344                processor p;
     
    43354348                }
    43364349        }
    4337         sout | "User main end" | endl;
     4350        sout | "User main end";
    43384351}
    43394352\end{cfa}
     
    50325045void ?{}( Line * l ) {
    50335046        l->lnth = 0.0;
    5034         sout | "default" | endl;
     5047        sout | "default";
    50355048}
    50365049
     
    50395052void ?{}( Line * l, float lnth ) {
    50405053        l->lnth = lnth;
    5041         sout | "lnth" | l->lnth | endl;
     5054        sout | "lnth" | l->lnth;
    50425055
    50435056}
     
    50455058// destructor
    50465059void ^?() {
    5047         sout | "destroyed" | endl;
     5060        sout | "destroyed";
    50485061        l.lnth = 0.0;
    50495062}
     
    57915804In particular, output of ©char© variable now print a character rather than the decimal ASCII value of the character.
    57925805\begin{cfa}
    5793 sout | 'x' | " " | (int)'x' | endl;
     5806sout | 'x' | " " | (int)'x';
    57945807x 120
    57955808\end{cfa}
     
    70217034#include <gmp>§\indexc{gmp}§
    70227035int main( void ) {
    7023         sout | "Factorial Numbers" | endl;
     7036        sout | "Factorial Numbers";
    70247037        Int fact = 1;
    70257038
    7026         sout | 0 | fact | endl;
     7039        sout | 0 | fact;
    70277040        for ( unsigned int i = 1; i <= 40; i += 1 ) {
    70287041                fact *= i;
    7029                 sout | i | fact | endl;
     7042                sout | i | fact;
    70307043        }
    70317044}
Note: See TracChangeset for help on using the changeset viewer.