Re: [AD] [ alleg-Bugs-1640516 ] MID() gives incorrect results

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 1/24/07, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
Peter Wang wrote:
>> MASkinG library uses MID. Changing the definition of MID would break it.
>
> How so?

Ask the author. I'm just giving an example of the allegro lib using MID
appropriately.

My point was that if you use Allegro's MID appropriately, then a swich
to a proper MID doesn't affect you. Allegro's MID(lowest, x, highest)
always picks out the middle value. The only time it doesn't is if the
first one is higher, but that makes no sense in the context of
Allegro's definition.

I grep'd masking's source, and as expected he uses it correctly. One example:

page = MID(1, page, 16)

If Allegro were to switch to a proper MID, the result would be the same.

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/