comp.lang.ada
 help / color / mirror / Atom feed
From: "R" <ruthless@poczta.onet.pl>
Subject: expect procedure name in procedure call(newbie)
Date: 29 Dec 2004 02:37:03 -0800
Date: 2004-12-29T02:37:03-08:00	[thread overview]
Message-ID: <1104316623.493536.111460@f14g2000cwb.googlegroups.com> (raw)

Hello.

I've got 'expect procedure name in procedure call' warning but
I think my code is good
Inside testclass.adb I have Create function and when I'm trying to call
it from
main.adb unit I receive that error.

Below are full codes of my Ada units.

And by the way - how can I dynamically allocate memory for e.g. 10
elements(array of Floats)?
How can I reallocate them to 20 elements or 4?
How can I free the memory?

thanks in advance
best regards R

Codes:

main.adb:
--------
with testclass;
procedure Main is
object : testclass.rec1_Access;
begin
testclass.Create(object, 10);
end Main;

testclass.ads:
--------------
package testclass is
type rec1 is tagged private;
type rec1_Access is access rec1;
function Create(this: rec1_Access; s: Integer) return Integer;
private
type rec1 is tagged record
field: Integer;
end record;
end testclass;

testclass.adb:
--------------
package body testclass is
function Create(this: rec1_Access; s: Integer) return Integer is
begin
this.field :=s;
		return this.field;
	end Create;
end testclass;




             reply	other threads:[~2004-12-29 10:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29 10:37 R [this message]
2004-12-29 12:07 ` expect procedure name in procedure call(newbie) Florian Weimer
2004-12-29 13:03   ` R
2004-12-29 13:24     ` Mark Lorenzen
2004-12-29 12:32 ` Martin Dowie
2004-12-29 12:34   ` Martin Dowie
2004-12-29 18:46 ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox