%% %% This is file `calc.sty', generated on <1994/1/21> %% with the docstrip utility (2.2c). %% %% The original source file was `calc.doc'. %% %% %% IMPORTANT NOTICE: %% You are not allowed to distribute this file. %% For distribution of the original source see %% the copyright notice in the file calc.doc. %% \def\RCS$#1: #2 ${#2} \def\fileversion{\RCS$Revision: 3.7 $} \def\filedate{\RCS$Date: 1993/09/26 19:56:43 $} %% \CheckSum{375} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% \typeout{Style Option: `calc' \fileversion\space <\filedate> (KKT and FJ)} \def\setcounter#1#2{\@ifundefined{c@#1}{\@nocnterr}% {\count@assign{\global\csname c@#1\endcsname}{#2}}} \def\addtocounter#1#2{\@ifundefined{c@#1}{\@nocnterr}% {\count@assign{\global\advance\csname c@#1\endcsname}{#2}}} \def\setlength{\skip@assign} \def\addtolength#1{\skip@assign{\advance#1}} \newcount\global@count \newcount\local@count \newdimen\global@dimen \newdimen\local@dimen \newskip\global@skip \newskip\local@skip \newmuskip\global@muskip \newmuskip\local@muskip \newcount\ratio@count \def\count@assign{\generic@assign\global@count\local@count} \def\dimen@assign{\generic@assign\global@dimen\local@dimen} \def\skip@assign{\generic@assign\global@skip\local@skip} \def\muskip@assign{\generic@assign\global@muskip\local@muskip} \def\generic@assign#1#2#3#4{\let\@tempa#1\let\@tempb#2% \expandafter\@open\expandafter(#4!% \global\@tempa\@tempb\egroup#3\@tempb} \def\pre@scan#1{% \ifx#1(% \let\next\@open \else \let\next\@numeric \fi \next#1} \def\@open#1{\bgroup\aftergroup\@initb\bgroup\aftergroup\@initb \pre@scan} \def\@initb{\@tempb\@tempa} \def\@numeric{\afterassignment\post@scan \global\@tempa} \def\post@scan#1#2{% \ifx#1!\let\next\egroup \else \ifx#1+\let\next\calc@plus \else \ifx#1-\let\next\calc@minus \else \def\@tmpc{#2}% \ifx#1*\let\next\@times \ifx\@tmpc\ratio@x \let\next\ratio@times \else \ifx\@tmpc\real@x \let\next\real@times \fi\fi \else \ifx#1/\let\next\@divide \ifx\@tmpc\ratio@x \let\next\ratio@divide \else \ifx\@tmpc\real@x \let\next\real@divide \fi\fi \else \ifx#1)\let\next\@close \else \expr@err#1% \fi\fi\fi\fi\fi\fi \next#2} \def\calc@plus{\egroup\global\@tempa\@tempb\egroup \bgroup\aftergroup\@add\bgroup\aftergroup\@initb \pre@scan} \def\calc@minus{\egroup\global\@tempa\@tempb\egroup \bgroup\aftergroup\@sub\bgroup\aftergroup\@initb \pre@scan} \def\@times{\egroup\bgroup \let\@tempa\global@count \let\@tempb\local@count \aftergroup\@mul \pre@scan} \def\@divide{\egroup\bgroup \let\@tempa\global@count \let\@tempb\local@count \aftergroup\@div \pre@scan} \def\@close{\egroup\global\@tempa\@tempb\egroup\global\@tempa\@tempb \post@scan} \def\@add{\advance\@tempb\@tempa} \def\@sub{\advance\@tempb-\@tempa} \def\@mul{\multiply\@tempb\global@count} \def\@div{\divide\@tempb\global@count} \def\ratio@times\ratio#1#2{\ratio@eval{#1}{#2}}% \def\ratio@divide\ratio#1#2{\ratio@eval{#2}{#1}}% \def\ratio@x{\ratio}% \def\real@times\real#1{% \xdef\the@ratio{#1} \egroup\bgroup \let\@tempa\global@count \let\@tempb\local@count \aftergroup\ratio@mul \post@scan}% \def\real@divide\real#1{\ratio@eval{1pt}{#1pt}}% \def\real@x{\real}% \def\ratio@eval#1#2{% \bgroup \dimen@assign\local@count{#1}% \dimen@assign\ratio@count{#2}% \ifnum\ratio@count>100000000 \divide\ratio@count 10 \divide\local@count 10 \fi \xdef\the@ratio{}% \global@count=\local@count \divide\global@count\ratio@count \xdef\the@ratio{\the@ratio\the\global@count.}% \ratio@calc \ratio@calc \ratio@calc \ratio@calc \ratio@calc \ratio@calc \egroup\egroup\bgroup \let\@tempa\global@count \let\@tempb\local@count \aftergroup\ratio@mul \post@scan} \def\ratio@calc{% \multiply\global@count\ratio@count \advance\local@count -\global@count \multiply\local@count 10 \global@count=\local@count \divide\global@count\ratio@count \xdef\the@ratio{\the@ratio\the\global@count}} \def\ratio@mul{\@tempb=\the@ratio\@tempb} \def\expr@err#1{% \errhelp{I expected to see one of: + - * / )} \errmessage{Invalid character `#1' in arithmetic expression}} \endinput %% %% End of file `calc.sty'.