comp.lang.ada
 help / color / mirror / Atom feed
* A question on function calls and defs.
@ 2001-03-08  2:30 mcdoobie
  2001-03-08  2:47 ` Larry Hazel
  2001-03-09  4:55 ` Jeffrey Carter
  0 siblings, 2 replies; 6+ messages in thread
From: mcdoobie @ 2001-03-08  2:30 UTC (permalink / raw)


Alright so I have this code that looks like this...

with Ada.Text_IO, Ada.Float_Text_IO;
use Ada.Text_IO, Ada.Float_Text_IO;

procedure simplemath is

begin
-- The rest of the code to the program would be here --

-- This is the section I have a question on --
if opt_is = 'V'
	then Put( Hi_prompt );
		Get( aHeight );
		the_volume := find_volume( aLength, aWidth, aHeight );  - Trouble here -
		NEW_LINE;
----- Cut to the Function itself -----

function find_volume( aLength, aWidth, aHeight : float ) return float is
	volume : float
	begin
		volume := aLength * aWidth * aHeight;
	return volume;
end find_volume;
end simplemath;

As you can probably tell, this is a pretty damn simple program. I'm
writing it just for practice with Ada95.

Now, the problem I'm having is that when I attempt to compile this code
it tells me that in my call to the "find_volume" function I have too many
arguments in the call. I'm not at all sure what that means. I'm searching
the compiler docs to find out, however a little insight would be
appreciated.

Now, at the function definition I'm getting the error that it's "not type
conformant" with my simplemath.ads file.(I did write an .ads file which I
used to generate a stub file which was then filled in with code. A really
nice touch to the language suite if you ask me. )
Now, I doubt anyone would want me to upload an entire .ads file to the
newsgroup( or would they?) however I'm assuming that the error message
itself is self-revealing to regular Ada programmers. Could someone point
me in the right direction on this one?

Should I upload the entire source to the newsgroup? Or would that be
considered rude?

Thanks in advance.

mcdoobie
mcdoobie@home.com



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

end of thread, other threads:[~2001-03-10 12:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-08  2:30 A question on function calls and defs mcdoobie
2001-03-08  2:47 ` Larry Hazel
2001-03-08  2:55   ` mcdoobie
2001-03-09  4:55 ` Jeffrey Carter
2001-03-09 20:39   ` mcdoobie
2001-03-10 12:12     ` Jeffrey Carter

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