[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tuesday 22 April 2003 2:57 pm, AE wrote:
> I think that on the PC, TRUE is generally defined as 1. Does anyone know
> what it's generally defined as on Macs? I'm sure that on the Atari ST, -1
> was often used.
I think it's more a question of the language used. BASIC uses -1, C uses 1,
C++ uses a separate type.
> Oops. Meant to be "if(bool1&&bool2 || !(bool1||bool2) )"
Unfortunately, this involves up to three (or so) conditional branches for code
generated by a reasonable compiler. Conditional branches tend to be a
bottleneck in high-end processors, unless they're predictable (i.e. follow a
pattern over time which the processor can keep track of). It helps if == can
be used.
Ben