>
> for (int i = 0; i < 1; i += step)
> This loop will either only iterate once, or it'll get stuck in infinite
> loop. Pop quiz... can you spot why?


If step > 1, it becomes 1 and dies.
If step < 1, it becomes 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11,
-12, -13, -14, -15, -16, -17, -18, -19
If step = 0, it becomes 0, 0 , 0, 0, 0, 0, 0 , 0, 0, 0, 0 , 0, 0,  0, 0 ,
0, 0,  0, 0 , 0, 0,  0, 0 , 0, 0

It is more likely that the author meant to write this (which he has since
admitted):

for (float f = 0f; i < 1.0; i += step)

- [email protected]


On Thu, Aug 28, 2014 at 10:21 AM, Ian Sannar <[email protected]> wrote:

> I fixed it by the way. xD Anybody can edit the files in the Karnex folder
> that I shared on Google Drive.
>
>
>
> On Thu, Aug 28, 2014 at 8:18 AM, Vesa <[email protected]> wrote:
>
>> On 08/28/2014 02:50 PM, musikbear wrote:
>> > diiz wrote
>> >> for (int i = 0; i < 1; i += step)
>> >> This loop will either only iterate once, or it'll get stuck in infinite
>> >> loop. Pop quiz... can you spot why?
>> > var i was initated <1
>> > i<=1 should secure one cycle, and i belive a pre-increment would too
>> (cant
>> > rem. the syntax :p
>>
>> Nope, that's not it.
>>
>> You fail the quiz musikbear ;)
>>
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> _______________________________________________
>> LMMS-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/lmms-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> LMMS-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lmms-devel
>
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
LMMS-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to