for(int v=0;v<ArraySize(levels);v++) { if(levels[v]==NormalizeDouble(PriceCheck,Digits)) adds=false; break; }
for(int g=0;g<ArraySize(levels);g++) { if(levels[g]==NormalizeDouble(PriceCheck,Digits)) add=false; break; }
No matter what the size of the loop, the break will stop it after the first pass
for(int v=0;v<ArraySize(levels);v++) { if(levels[v]==NormalizeDouble(PriceCheck,Digits)) { adds=false; break; } }
for(int g=0;g<ArraySize(levels);g++) { if(levels[g]==NormalizeDouble(PriceCheck,Digits)) { add=false; break; } }
add the curly braces so that the loop completes
Can't believe I missed that! Thanks!
Richard
Hi, how do I remove duplicate values from an array? I have tried to add a check to stop it adding duplicate values in the first place - but this doesn't seem to work.
Thanks!
Richard