need help!

Discussion in 'C' started by ratheeshp, May 24, 2007.

  1. ratheeshp

    ratheeshp New Member

    Joined:
    May 24, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Is it possible to write "return" function inside a conditional operator? If yes please inform me how is it possible.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,336
    Likes Received:
    377
    Trophy Points:
    83
    Code:
    x>1?1:fx();
    fx return type is an integer.
     
  3. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    If you mean return keyword instead of return function, then:
    Code:
        if (error) return EOF;
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice