Boolean true - positive 1 or negative 1?

前端 未结 11 1280
一生所求
一生所求 2020-12-31 11:05

I\'m designing a language, and trying to decide whether true should be 0x01 or 0xFF. Obviously, all non-zero values will be converted to true, but I\'m trying t

11条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 11:32

    Why are you choosing that non-zero values are true? In Ada true is TRUE and false is FALSE. There is no implicit type conversion to and from BOOLEAN.

提交回复
热议问题