Doku-Base
Texi2html Linux Dokumentation
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.3 Conventions used for function prototypes

As the functions are defined by a reference name, we will always use the reference name in function prototypes. For the function arguments we will use \@array for a reference on an array and similarly \%hash for a reference on a hash.

Thus, the prototype for the function associated with the function reference ‘$formatting_function’ will be:

Function Reference: $text formatting_function $arg1 \@arg2

formatting_function takes as first argument $arg2, as second argument a reference on an array \@arg2 and returns the formatted text $text.

To redefined the corresponding function, you should write:

 
$formatting_function = \&my_formatting_function

sub my_formatting_function($ $)
{
    my $arg1 = shift;
    my $arg2 = shift;
    # prepare $formatted_text
    .....
    return $formatted_text
}

[ < ] [ > ]   [ << ] [ Up ] [ >> ]


Doku-Base

This document was created by Netzdino using texi2html.