spielwiese
Last change
on this file since aeb6d3 was
aeb6d3,
checked in by Michael Brickenstein <bricken@…>, 18 years ago
|
*bricken: refactoring
git-svn-id: file:///usr/local/Singular/svn/trunk@8372 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
846 bytes
|
Line | |
---|
1 | from objects import * |
---|
2 | from context import * |
---|
3 | import arith1 |
---|
4 | context=Context() |
---|
5 | context.push({}) |
---|
6 | i=OMint(22482489) |
---|
7 | #print i.body |
---|
8 | print i.XMLencode(context) |
---|
9 | print context.XMLEncodeObject(i) |
---|
10 | v=OMVar("x") |
---|
11 | print v.XMLencode(context) |
---|
12 | x=v |
---|
13 | y=OMVar("y") |
---|
14 | a=OMApply(OMSymbol("plus",arith1.content),[x,y,i]) |
---|
15 | print a.XMLencode(context) |
---|
16 | print context.XMLEncodeObject(context.evaluate(a)) |
---|
17 | a1=OMApply(OMSymbol("plus",arith1.content),[OMint(1),OMint(2)]) |
---|
18 | a2=OMApply(OMSymbol("plus",arith1.content),[a1,OMint(2)]) |
---|
19 | a3=OMApply(OMSymbol("plus",arith1.content),[a2,x]) |
---|
20 | context.addCDImplementation(arith1.implementation) |
---|
21 | print "a3", context.XMLEncodeObject(context.evaluate(a3)) |
---|
22 | print "a2", context.XMLEncodeObject(context.evaluate(a2)) |
---|
23 | print "a1", context.XMLEncodeObject(context.evaluate(a1)) |
---|
24 | |
---|
25 | f=OMfloat(1.23434) |
---|
26 | print context.XMLEncodeObject(f) |
---|
27 | #print v.XMLAttributes |
---|
28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.