File: foreach_with_statement_example.tex

package info (click to toggle)
kimwitu-doc 10a-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 1,192 kB
  • ctags: 341
  • sloc: makefile: 166; yacc: 125; ansic: 40; lex: 18; sh: 2
file content (11 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
% Remember to use the lgrind style

\File{foreach\_with\_statement\_example.k},{14:36},{Feb 19 1997}
\L{\LB{\V{expr}_\V{sum}(\V{exprlist}_\V{el})_\{}}
\L{\LB{____\V{expr}_\V{sub\_total}_=_\V{Zero}();}}
\L{\LB{____\K{foreach}(_\V{\$e};_\V{exprlist}_\V{el}_)_\{}}
\L{\LB{________\V{Add}(_\V{x}_):}\Tab{24}{\{_\V{sub\_total}_=_\V{Plus}(_\V{sub\_total},_\V{x}_);_\}}}
\L{\LB{________\V{Subtract}(_\V{x}_):}\Tab{24}{\{_\V{sub\_total}_=_\V{Minus}(_\V{sub\_total},_\V{x}_);_\}}}
\L{\LB{____\}}}
\L{\LB{____\K{return}_\V{sub\_total};}}
\L{\LB{\}}}