in reply to Re^2: Function signatures in POD-headlines/pseudo code! Is there a standard?
in thread Function signatures in POD-headlines/pseudo code! Is there a standard?

there is another trap...

@coordinates

could either mean

How do you solve this?

Cheers Rolf

PS: I expect you now to say that you always avoid prototypes, right? ;-)

  • Comment on Re^3: Function signatures in POD-headlines/pseudo code! Is there a standard?
  • Download Code

Replies are listed 'Best First'.
Re^4: Function signatures in POD-headlines/pseudo code! Is there a standard?
by ikegami (Patriarch) on Dec 07, 2009 at 19:26 UTC

    I would list the four scalars if I wanted four scalars. You can always define the format of @coordinates at the top and use that, but I don't see any gain in doing so.

    The name of a variable can only tell so much. Extra limitations (e.g. that it must be an array) can be documented below.

    I expect you now to say that you always avoid prototypes, right? ;-)

    Close. I tend to write classes, and prototypes don't apply to methods.

Re^4: Function signatures in POD-headlines/pseudo code! Is there a standard?
by Anonymous Monk on Dec 09, 2009 at 08:00 UTC
    or an array which is taken per reference, because of the prototype (like in shift)

    Method calls are not influenced by prototypes

    sub Y::Pushy(\@){ warn join ' ', map {"($_)"} @_, ''; } my @blah = 1 .. 2; Y::Pushy @blah; Y->Pushy(@blah); __END__ (ARRAY(0x3d8bbc)) () at - line 2. (Y) (1) (2) () at - line 2.