From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9fd97969641aa8c6,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Thomas Bruns Newsgroups: comp.lang.ada Subject: how can i allocate an objekt with initialization??? Date: Sun, 05 Dec 2004 17:54:45 +0100 Organization: T-Online Message-ID: Reply-To: newsgroup@donbruno.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1102265685 04 27642 VrfMXwBrezzxIRn 041205 16:54:45 X-Complaints-To: usenet-abuse@t-online.de X-ID: bo3QuBZAQeBMIuGCLalLGnduxqGYxclK261-JZoDaVKZF0ymCubwEy User-Agent: KNode/0.8.1 Xref: g2news1.google.com comp.lang.ada:6780 Date: 2004-12-05T17:54:45+01:00 List-Id: Hello i have a problem, with initialzie objekt with ada... i want to do a new, to allocate the objekt... -------------------------------------------------------------- with ADA.FINALIZATION; use ADA.FINALIZATION; package class_test_package is type FATHER_CLASS is new CONTROLLED with record INT1 : INTEGER; end record; type FATHER_CLASS_PTR is access FATHER_CLASS'Class; function GETINT1 return INTEGER is abstract; end class_test_package; with class_test_package; use class_test_package; package class_test_package_ableitung is type CHILD_CLASS is new FATHER_CLASS with private; type CHILD_CLASS_PTR is access CHILD_CLASS'CLASS; private procedure Initialize (OBJECT : in out KIND_CLASS); procedure Finalize (OBJECT : in out KIND_CLASS); procedure ADJUST (OBJECT : in out KIND_CLASS); type CHILD_CLASS is new FATHER_CLASS with record INT2 : INTEGER; end record; end class_test_package_ableitung; main: TEST : FATHER_CLASS_PTR; begin TEST:= new CHILD_CLASS'(INT=>1); -- i will initialze the objekt here,but -- it wrong?? --class_test.adb:11:57: expected private type "KIND_CLASS" defined at --class_test_package_ableitung.ads:16 --class_test.adb:11:57: found a composite type end;