Next: Listing: Lisp2Pro Up: Beispiele in zwei Previous: serialiser

signum


rfi-p> 
style lisp
rfi-l> destroy
rfi-l> consult "/home/rfm/RFM/extensions/signum.rf"
; Reading file "/home/rfm/RFM/extensions/signum.rf" ..
rfi-l> listing
(ft (signum _x)
    (< _x 0)
    -1 )
(ft (signum 0)
    0 )
(ft (signum _x)
    (> _x 0)
    1 )
rfi-l> style prolog
rfi-p> listing
signum(X) :- <(X, 0) & -1.
signum(0) :-& 0.
signum(X) :- >(X, 0) & 1.


Harold Boley & Michael Herfert (herfert@dfki.uni-kl.de)