for/next/step - did i find a bug?
4 posts
• Page 1 of 1
i don't know if this is a bug, or if i'm defining variable kind wrongly ('j' is not stopping at '0') - thanks in advance! 
Re: for/next/step - did i find a bug?
This has been discussed many times.
You're defining j variable as Uinteger, so a FOR from 16384 DOWNTO 0 will stop when the j variable passes beyond 0, thus negative. This will never happen, because j is always positive (UInteger), so it overflows from 0 to (65535 - 31) and never stops
You're defining j variable as Uinteger, so a FOR from 16384 DOWNTO 0 will stop when the j variable passes beyond 0, thus negative. This will never happen, because j is always positive (UInteger), so it overflows from 0 to (65535 - 31) and never stops
Re: for/next/step - did i find a bug?
Did you try changing the value type? 
Re: for/next/step - did i find a bug?
boriel wrote:Did you try changing the value type?
nope, i kept uinteger, because i were only using values from 0 to 65535 - btw, i got that overflow issue you told, and this situation is focusing me on try different aproaches when coding - thanks
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests

