Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

build open-axiom

54461 views
--Copyright The Numerical Algorithms Group Limited 1991.

-- This file shows the difference between assignments and rewrite
-- rules.
 
a := 1
b := a         -- the value of b is now 1
b              -- see, told you
a := 2         -- what is the value of b?
b              -- it is the value it had AT ASSIGNMENT
 
c == 1         -- c is a rule
c              -- it will evaluate to 1
d == c         -- d is a rule that will evaluate to c
d
c == 2         -- we have changed the rule for c
d              -- and so the ultimate value computed from d will change