Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> HELP! object relational

HELP! object relational

From: Kathrin Holweger <kaholli_at_web.de>
Date: Sat, 21 Jul 2001 21:22:22 GMT
Message-ID: <3b2b4297$1@netnews.web.de>

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

-- 
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de
Received on Sat Jul 21 2001 - 16:22:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US