This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

In 8051 MikroC PRO, how do I combine two void functions into a void main function?

I've formed two void functions and I want to combine the two void function together in a void main function. However, the system shows that I can't combine two void functions. How do I combine the two void function together so I can play both function at the same time?

Parents
  • 8051 MikroC PRO is not an ARM (or  Keil) product - so why are you posting here at all?

    the system shows that I can't combine two void functions

    What "system"? and how does it show that?

    Of course you can combine two functions:

    void function_1( void )
    {
        // do function_1 stuff
    }

    void function_2( void )
    {
        // do function_2 stuff
    }

    simply becomes

    void combined_function( void )
    {
        // do function_1 stuff
        
        // do function_2 stuff
    }

Reply
  • 8051 MikroC PRO is not an ARM (or  Keil) product - so why are you posting here at all?

    the system shows that I can't combine two void functions

    What "system"? and how does it show that?

    Of course you can combine two functions:

    void function_1( void )
    {
        // do function_1 stuff
    }

    void function_2( void )
    {
        // do function_2 stuff
    }

    simply becomes

    void combined_function( void )
    {
        // do function_1 stuff
        
        // do function_2 stuff
    }

Children
No data