Or you can just declare it before you use it,
which is actually the usage shown in the question...

    TOS_MsgPtr packet(TOS_MsgPtr msg);

    func()
    {
         packet( msg );
    }

    TOS_MsgPtr packet(TOS_MsgPtr msg)
    {
        //stuff
        return( msg );
    }

Pablo Gil Montaño wrote:
I think perhaps you are calling the function before defining it.
Rearrange the outline of your file and put the code of the function before any call to it. This should solve the problem.

Example:

void function(){
    //definition must go before call
}

command result_t Interface.comm(){
    //whatever
    function();
}

*/primalfear 69 <[EMAIL PROTECTED]>/* escribió:

    hello everybody,
in my program i defined my own function as TOS_MsgPtr
    packet(TOS_MsgPtr msg);
after receiving a complete data packet from the radio,i
    called for the above function as "packet(data)" (where data is the
    received TOS_MsgPtr),.....when i tried to compile this file i am get
    error as " implicit declaration of function packet "...........so i
    am struct ..........so can anyone help me out why is it giving such
    an error............
with regards _______________________________________________
    Tinyos-help mailing list
    [email protected]
    https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


------------------------------------------------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com <http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/>


------------------------------------------------------------------------

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to