Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> HELP! object relational
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));
I really hope someone can help me out!
Thanks, Holli
-- __________________________________________________________ News suchen, lesen, schreiben mit http://newsgroups.web.deReceived on Sat Jul 21 2001 - 16:22:22 CDT