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

Conversion problem

uint64_t build_table ( int32_t myparameter ) {

 if ( myparameter == 7 ) {
   return BOOL_TRUE;
 }
 else if
 (myparameter == 29 ) {
   return BOOL_FALSE;
  }
  else
 {
   return 23;
 }

 return 5;
}


Parents
  • now i told to only return BOOL_TRUE or BOOL_FALSE but i need to also return 27, 23 and 5. can i return more values if i make it a class?

    uint64_t build_table ( int32_t myparameter ) {
    
     if ( myparameter == 7 ) {
       return BOOL_TRUE;
     }
     else if
     (myparameter == 29 ) {
       return BOOL_FALSE;
      }
      else
     {
       return 23;
     }
     else if
       (myparameter != "0")
     {
       return 27;
      }
     else
     {
       return 5;
       }
    }
    

Reply
  • now i told to only return BOOL_TRUE or BOOL_FALSE but i need to also return 27, 23 and 5. can i return more values if i make it a class?

    uint64_t build_table ( int32_t myparameter ) {
    
     if ( myparameter == 7 ) {
       return BOOL_TRUE;
     }
     else if
     (myparameter == 29 ) {
       return BOOL_FALSE;
      }
      else
     {
       return 23;
     }
     else if
       (myparameter != "0")
     {
       return 27;
      }
     else
     {
       return 5;
       }
    }
    

Children