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
  • You can return more values if you simply code it properly. If the if/then/else logic escapes you consider a switch/case implementation.

    At the moment you pass in a value, and return a value, not sure this situations calls for anything more complex until you grasp the concepts more thoroughly.

    Do you understand pointers?

    Please find a copy of the K&R C manual and read it.

Reply
  • You can return more values if you simply code it properly. If the if/then/else logic escapes you consider a switch/case implementation.

    At the moment you pass in a value, and return a value, not sure this situations calls for anything more complex until you grasp the concepts more thoroughly.

    Do you understand pointers?

    Please find a copy of the K&R C manual and read it.

Children