Nested for loop issue
safety0ff
safety0ff.dev at gmail.com
Sun Oct 27 02:33:30 PDT 2013
On Sunday, 27 October 2013 at 09:05:06 UTC, Sumit Adhikari wrote:
> for (ushort i = 0 ; i < 65536 ; ++i){ // Holy King-Kong!
>
> for (ushort j = 0 ; j < 65536 ; ++j){
>
> status += testStimEq(i,j,cast(ushort)(i+j));
>
> }
> }
> What is that I am doing ?
You have an infinite loop nested within another infinite loop,
ushort cannot represent a value which is >= 65536.
More information about the Digitalmars-d
mailing list