Re: Declaring a Function Before it is used
- Posted by Irv Mullins <irvm at ellijay.com> Oct 30, 2003
- 420 views
On Thursday 30 October 2003 09:17 am, you wrote: > > > On Thu, 30 Oct 2003 08:02:32 -0500, Irv Mullins <irvm at ellijay.com> > > wrote: > >it might be nice to be able to give meaningful > >or descriptive names to the parameters. > > Why? The actual routine definition does that. > All you need to know is whether it is a procedure or function, which > I'm assuming won't be difficult to deduce from the context (unless > someone has an example where it might be?) and the number of > parameters, which again I would imagine is just a matter of counting > them. Documentation - it's a good thing. Which is more meaningful: function count (2) or function count (customers, transactions) Note that there is no need for the words used to be valid variables. Words are just more meaningful than (2) would be. If you don't want them to have any meaning, just use (a,b) or (param1, param2) > One thing I will say is that forward definition of types should NOT be > allowed, since by doing so they would actually be used before they > were defined, to allocate the right space for the variable, as opposed > to functions and procedures which can be referenced, but not actually > called until after the routine is properly defined. Yes, I don't see any purpose in forward type declarations. Irv