A compile warning is "narrowing down". Is this what it means? I.e., having int as return type whereas passed are shorts. Like so:
Code:int foo(short a, short b) { some code }
A compile warning is "narrowing down". Is this what it means? I.e., having int as return type whereas passed are shorts. Like so:
Code:int foo(short a, short b) { some code }
A narrowing conversion is the inverse of your example, storing a larger type (e.g. an int) in a smaller one (e.g. a short). Since the smaller type cannot represent the entire possible range of values of the larger type, data could be discarded in the conversion.