|
|
last edited 16 years ago by gdr |
1 2 3 | ||
Editor: Bill Page
Time: 2008/05/28 16:18:30 GMT-7 |
||
Note: |
changed: -MyPair(T:Domain):Domain=Record(x:T,y:T) MyPair(T:Domain):Domain==Record(x:T,y:T) changed: -MyAlt(T:Domain):Domain=Union(p:T,q:T) MyAlt(T:Domain):Domain==Union(p:T,q:T)
This function that returns a Domain has the side-effect of declaring x and y:
axiomMyPair(T:Domain):Domain==Record(x:T,y:T) Function declaration MyPair : Domain -> Domain has been added to workspace.
axiomw:MyPair(Float) Cannot compile the declaration for x because its (possible partial) type contains a local variable. OpenAxiom will attempt to step through and interpret the code.
Compiling function MyPair with type Domain -> Domain Compiled code for MyPair has been cleared.
axiomx x is declared as being in Float but has not been given a value. y y is declared as being in Float but has not been given a value. w w is declared as being in Record(x: Float,y: Float) but has not been given a value.
But this does not happen for Union
axiomMyAlt(T:Domain):Domain==Union(p:T,q:T) Function declaration MyAlt : Domain -> Domain has been added to workspace.
axiomr:MyAlt(Float) Cannot compile the declaration for p because its (possible partial) type contains a local variable. OpenAxiom will attempt to step through and interpret the code.
Compiling function MyAlt with type Domain -> Domain
axiomp
(1) |
axiomq
(2) |
axiomr r is declared as being in Union(p: Float,q: Float) but has not been given a value.