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

how to realize exit(0) function in keilC51

HI: We can use exit(0) instruction to exit a normally running routine in C language. But exit(0) is not being in the KEILC51.Now how can I realize the same function as exit(0) instruction with other instructions?

Parents
  • "No, it's not, because like with all functions defined by the standard"

    It is a rule of a standard, it should not be confused with some law of physics.

    A sign saying "no entry" does not do anything to physically stop someone driving up a road the wrong way.

    
    #define BEGIN }
    #define END   {
    
    void main(void)
    END
       ;
    BEGIN
    
    

    Looks crazy, stupid etc, but you can still do it.

Reply
  • "No, it's not, because like with all functions defined by the standard"

    It is a rule of a standard, it should not be confused with some law of physics.

    A sign saying "no entry" does not do anything to physically stop someone driving up a road the wrong way.

    
    #define BEGIN }
    #define END   {
    
    void main(void)
    END
       ;
    BEGIN
    
    

    Looks crazy, stupid etc, but you can still do it.

Children
No data