Author |
Message |
Topic: Addition Loop Error |
davie1_1
Replies: 3
Views: 6982
|
Forum: General CCS C Discussion Posted: Sat Jul 30, 2005 12:48 pm Subject: Addition Loop Error |
for some reason I added i++ after the loop and now I get the correct answer in full speed. If I remove the i++ it does it again. I don't know why this would be but increment is a single instruction so ... |
Topic: Addition Loop Error |
davie1_1
Replies: 3
Views: 6982
|
Forum: General CCS C Discussion Posted: Mon Jul 25, 2005 11:31 pm Subject: Addition Loop Error |
Hi All,
I keep getting an wrong addition total from the folloing loop:
int32 pos_peak;
pos_peak = 0;
for(i=32; i!=0; i--){
pos_peak += 50000;
}
The total should be 1,600,0 ... |
|