Computer Science Canada

Implement by Problems

Author:  tiedye1 [ Sun Apr 29, 2012 2:39 pm ]
Post subject:  Implement by Problems

What is it you are trying to achieve?
I have four classes that are supposed to implement one other class.


What is the problem you are having?
The line:
Turing:

implement by ObjectOne, ObjectTwo, ObjectThree

Returns an error at the first comma: "Syntax error at '.'"


Describe what you have tried to solve this problem
I've tried various characters including spaces to separate the classes, and I've tried using more than one implement by clause.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:

unit
class Object
    implement by Line, Oval, Rectangle, Polygon
    export create, save, load, draw
    deferred proc create (xs,ys:array 1 .. * of int, nr, ng, nb : real, nf : boolean)
    deferred proc save(file:int)
    deferred proc load(file:int)
    deferred proc draw
end Object


Please specify what version of Turing you are using
4.1.1

Author:  tiedye1 [ Sun Apr 29, 2012 4:55 pm ]
Post subject:  RE:Implement by Problems

Never mind, I solved it. I just need to use inherit instead of implement. Razz

Author:  Raknarg [ Sun Apr 29, 2012 6:26 pm ]
Post subject:  RE:Implement by Problems

thats what I was thinking Razz However, I had no Idea what you were doing. Sorry.


: