Help please - Object Relational
Date: 16 Jun 2001 00:14:01 -0700
Message-ID: <b83f6f2f.0106152314.183d2a16_at_posting.google.com>
Hi,
In a lecture we got the following code as an example how object relational stuff works with oracle and we're supposed to do an assignment according to this. unfortunately the code doesn't compile and I couldn't find what's wrong with it anywhere. Maybe anyone here can help me out finding what's missing there?
create type point_t as object(
x number,
y number);/
create type line_t as object(
end1 point_t,
end2 point_t);/
alter type line_t replace as object(
end1 point_t,
end2 point_t,
member function linelength (scale in number)
return number,
pragma restrict_references (linelength, wnds));/
****Up to this point it works. now comes the stuff that won't compile****
create type body line_t as
member function linelength(scale number) return
number is
begin
return
scale * sqrt((self.end1.x - self.end2.x)
* (self.end1.x - self.end2.x)
+ (self.end1.y - self.end2.y)
* (self.end1.y - self.end2.y));
end;
end;
I really hope someone can help me out!
Thanks, Holli Received on Sat Jun 16 2001 - 09:14:01 CEST