Log In  

Seems to get confused if the first number is the largest:

P#12606 2015-08-12 21:37 ( Edited 2015-08-14 00:23)

Wow, this is an ancient bug. I used the same code 1000s of times over 15 years, but by chance always with low values as the first parameter. o_O

Anyway, thanks! -- fixed for 0.1.2

P#12621 2015-08-13 11:25 ( Edited 2015-08-13 15:26)

What is mid() useful for, anyway?

P#12624 2015-08-13 13:08 ( Edited 2015-08-13 17:08)

I normally use it to bound a something between a minimum and maximum
e.g. to make sure 0 <= x <= 127

x = mid(0, x, 127)

P#12627 2015-08-13 13:17 ( Edited 2015-08-13 17:18)

Which is really useful in games.

Doing it with MID() saves tokens/screen space/headaches because you typed "else if" instead of "elseif".

P#12638 2015-08-13 18:28 ( Edited 2015-08-13 22:28)

ooh good to know! now i can save tokens!

P#12641 2015-08-13 19:48 ( Edited 2015-08-13 23:48)

Heh, impbox, I immediately thought of you when I read that exchange.

P#12642 2015-08-13 20:23 ( Edited 2015-08-14 00:23)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 06:53:56 | 0.007s | Q:20