[LUGA] Mit freundlicher Unterstützung von:
Linux New Media AG

Mail Thread Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lll]: sendmail calculator (fwd)



Das ist zu schön, das muß ich weitergeben:

> From owner-lll@radawana.cg.tuwien.ac.at Thu May 15 20:10:10 1997
> Delivered-To: hjp@sikitu.wsr.ac.at
> Message-Id: <m0wRHOY-0006lIC@xphys.tuwien.ac.at>
> From: mike@xphys.tuwien.ac.at (Mike Rumpler)
> Subject: [lll]: sendmail calculator
> To: lll@radawana.cg.tuwien.ac.at
> Date: Tue, 13 May 1997 15:13:34 +0200 (MET DST)
> X-Mailer: ELM [version 2.4 PL25]
> MIME-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Sender: owner-lll@radawana.cg.tuwien.ac.at
> Precedence: bulk
> 
> was lustiges nebenbei....
> hier eine kleine demonstration was "featuritis" aus
> programmen machen kann....
> 
> ein configfile, dass aus dem sendmail einen rechner
> macht..
> 
> have fun,
> Mike
> 
> ------------------------------------------------------------------------------
>   Dipl. Ing. Rumpler Michael   mailto:mike@xphys.tuwien.ac.at
>                                http://sus1.xphys.tuwien.ac.at/mike
>                                                                        
>   private: Pohlgasse 41/14, 1120 WIEN, phone 8170494 AirPage 0688-4220313
> ------------------------------------------------------------------------------
> 
> ------------------------- SNIP -----------------------------------
> 
> ################################################
> ################################################
> ####                                        ####
> ####  Simple calculator in sendmail.cf      ####
> ####                                        ####
> ####  by Matthew Slattery <mjs@atml.co.uk>  ####
> ####                                        ####
> ####  version 0.03 (4th October 1996)       ####
> ####                                        ####
> ################################################
> ################################################
> 
> 
> #
> #  Invoke as follows:
> #
> #    /usr/lib/sendmail -bt -C<filename>
> #
> #  ...where <filename> is this file.
> #
> #  Then you should enter sums prefixed with "9 ",  e.g.
> #
> #    > 9 1+2
> #    > 9 20-6
> #    > 9 5*-4
> #
> #  More complex expressions (e.g. '1+2*3-4') work too.
> #
> #  Addition (+), subtraction (-), multiplication (*, x or X), integer division
> #  (/) and modulus (%) are supported.  Brackets are not.  Expressions are
> #  evaluated strictly from left to right (i.e. no operator priorities).
> #
> #  If numbers become to large, strange things may happen e.g. "Infinite
> #  loop" or "Expansion too long" errors.  With my sendmail, 100 recursive
> #  calls is considered infinite, so a result of greater than 99 will cause
> #  problems (but you can calculate with larger numbers -- "125-50" works).
> #
> #
> 
> V5
> Do.:%@!^/[]0123456789+-*xX
> CX 0 1 2 3 4 5 6 7 8 9
> CY + - * / % !
> CZ 0 1 2 3 4 5 6 7 8 9 + - * / %
> S9
> R$*x$*			$1*$2
> R$*X$*			$1*$2
> R$*$~Z$*		$1$3
> R$*$=Y			$1
> R$*			$:!$1!
> R!!			$@0
> R$*$=Y$=X$*		$1$2[$3$4
> R$*$=X$=Y$*		$1$2]$3$4
> R!$*[$*]$*!		$1[$2]$3
> R$*			$:$>5$1
> R$*[$*]$*[$*]$*		$>7$1[$2]$3[$4].$5
> R$*[]$*			$@0
> R$*-[$*]$*		$:-$2
> R$*[$*]$*		$:$2
> R$*			$:$1:0
> R$*@:$*			$>6$1:$2
> R$*:$*			$@$1$2
> S8
> R$*<$*$=X$*>$*		$:$1<$2.$3$4>$5
> R$*<$*.0$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2$3>$4
> R$*<$*.1$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@$3>$4
> R$*<$*.2$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@$3>$4
> R$*<$*.3$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@$3>$4
> R$*<$*.4$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@$3>$4
> R$*<$*.5$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@$3>$4
> R$*<$*.6$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@$3>$4
> R$*<$*.7$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@$3>$4
> R$*<$*.8$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@@$3>$4
> R$*<$*.9$*>$*		$:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@@@$3>$4
> S5
> R$*[$=X$*]$*		$:$1<$2$3>$4
> R$*			$:$>8$1 
> R$*<$*>$*		$:$1[$2]$3
> R$*$=X$*		$@$>5$1$2$3
> S7
> R$*--$*			$1+$2
> R$*+-$*			$1-$2
> R$*-+$*			$1-$2
> R$*++$*			$1+$2
> R+$*			$1
> R[$*]+[$*].$*		$@[$1$2]$3
> R-[$*]-[$*].$*		$@-[$1$2]$3
> R-[$*]+[$*].$*		$:[$2]-[$1].$3
> R[$*@]-[@$*].$*		[$1]-[$2].$3
> R[$*]-[].$*		$@[$1]$2
> R[]-[$*].$*		$@-[$1]$2
> R-[$*]*-[$*].$*		$:[$1]*[$2].$3
> R[$*]*-[$*].$*		$:-[$1]*[$2].$3
> R$*[]*[$*].$*		$@$1[]$3
> R$*[$*]*[$*].$*		$:$1[$2]*[$3!].$4
> R$*[$*@]*[$*!$*].$*	$1[$2]*[$3!$3$4].$5
> R$*[]*[$*!$*].$*	$@$1[$3]$4
> R-[$*]/-[$*].$*		$:[$1]/[$2].$3
> R[$*]/-[$*].$*		$:-[$1]/[$2].$3
> R$*[$*]/[].$*		$#error $@ USAGE $: "Division by zero"
> R$*[$*]/[$*].$*		$:$1[$2]/[$3!$3!].$4
> R$*[$+]/[$*!$*!$*].$*	$>4$1[$2]/[$3!$4!$5].$6
> R$*[$*]/[$*!$*!$*].$*	$@$1[$5]$6
> R$*[$*!$*!$*].$*	$@$1[$2]$5
> R-[$*]%-[$*].$*		$:[$1]%[$2].$3
> R[$*]%-[$*].$*		$:-[$1]%[$2].$3
> R$*[$*]%[].$*		$#error $@ USAGE $: "Division by zero"
> R$*[$*]%[$*].$*		$:$1[$2]/[$3!$3!].$4
> R$*[$+]/[$*!$*!$*].$*	$>4$1[$2]/[$3!$4!$5].$6
> R$*[$*]/[$*!$*!$*].$*	$@$1[]$6
> R$*[$*!$*!$*].$*	$@$1[$4]$5
> S6
> R$*:			$@$1:1
> R$*:$*0			$@$1:$2 1
> R$*:$*1			$@$1:$2 2
> R$*:$*2			$@$1:$2 3
> R$*:$*3			$@$1:$2 4
> R$*:$*4			$@$1:$2 5
> R$*:$*5			$@$1:$2 6
> R$*:$*6			$@$1:$2 7
> R$*:$*7			$@$1:$2 8
> R$*:$*8			$@$1:$2 9
> R$*:$*9			$:$>6$1:$2
> R$*:$*			$@$1:$2 0
> S4
> R$*[$*@]/[@$*!$*!$*].$*	$1[$2]/[$3!$4!$5].$6
> R$*[]/[$+!$*!$*].$*	$:$1[$4!$2!$3].$5
> R$*[$*]/[$*!$*!$*].$*	$@$1[$2]/[$4!$4!@$5].$6
> R$*[$*!$*@!$*@].$*	$1[$2!$3!$4].$5
> 
> ______________________________________________________________________________
> 
> Schreib an die Liste unter: lll@radawana.cg.tuwien.ac.at
> Bei Problemen schreib an:   MajorDomo@radawana.cg.tuwien.ac.at help im BODY!
> Archiv: http://radawana.cg.tuwien.ac.at/mail-archives/lll/ghindex.html
> ______________________________________________________________________________
> 




powered by LINUX the choice of a gnu generation
linux user group austria;
Suche
Suche
Letzte Änderung:
webmaster@luga.at
September 2010