c type short int to euphoria int conversion
- Posted by cp Dec 06, 2008
- 1045 views
I'm calling a c api that returns a boolean value (defined as a unsigned short int in the c header file) and I assign this to a euphoria integer. Since the boolean value is an error code either a 1 or 0. When I test the Euphoria integer I don't get a 1 but some other value. Is it safe for me to assume that anything other than a 0 is the same as a 1 in the short int I retrieve and that if the short int is a zero it will still be a zero when assigned to eu integer. Or am I way off and there is a better way. Thanks