comp.lang.ada
 help / color / mirror / Atom feed
* expect procedure name in procedure call(newbie)
@ 2004-12-29 10:37 R
  2004-12-29 12:07 ` Florian Weimer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: R @ 2004-12-29 10:37 UTC (permalink / 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;




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-29 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-29 10:37 expect procedure name in procedure call(newbie) R
2004-12-29 12:07 ` 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

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