6 years, 11 months ago.

Why is there no HIGH/LOW , TRUE/FALSE defines

I know they are easy to define, but why are they not (or don't appear to be) already in the programming syntax for mbed? Have they gone out of fashion or frowned upon for some reason? Cheers Mike

1 Answer

6 years, 11 months ago.

true/false exist, or do you mean high = true, low = false defines? There is something to say both for having them and for not having them. As you say, they are easy to define if you like to have them. But in general 1 and 0 (or true and false) do the job fine. In general to describe logic signals 1 and 0 are used alot.

I was taught that false=0 and true!=false so there is a bit of difference, it's just they flagged up as errors in the compile and I tried different spellings but never really investigated too deeply until now.

posted by Michael Bawden 31 Oct 2014