Hi All,<div><br></div><div>I am encountering an error when the bound on my foreach loop exceeds 1,021.</div><div><br></div><div><div>#include <builtins.swift></div><div>#include <io.swift></div><div>#include <sys.swift></div>
<div>main{</div><div><br></div><div> int bound = toint(argv("bound"));</div><div> float sleepTime = tofloat(argv("sleeptime"));</div><div><br></div><div> // print for debug</div><div> printf("The number of arguments is: %i\n", argc());</div>
<div> printf("The bound is: %i\n", bound);</div><div> printf("The sleeptime is: %f\n", sleepTime);</div><div><br></div><div> // run the sleep</div><div> foreach i in [1:bound:1]{</div>
<div>
sleep(sleepTime);</div><div> }</div><div>}</div></div><div><br></div><div>Running with the bound set to 1022 and above results in the following error:</div><div><br></div><div><div>===================================================================================</div>
<div>= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES</div><div>= EXIT CODE: 11</div><div>= CLEANING UP REMAINING PROCESSES</div><div>= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES</div><div>===================================================================================</div>
<div>YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)</div><div>This typically refers to a problem with your application.</div><div>Please see the FAQ page for debugging suggestions</div></div>
<div><br></div><div>Could someone point me to the FAQ page with debugging suggestions? Are there any limits to the sizes of the foreach loops?</div><div><br></div><div>Thank you,</div><div>Scott</div>