Y
yezi
HI:
The code I write is :
static int numTrial;
static float perCentage;
static int gapValue;
static int inValue;
for( gapValue = inValue; gapValue <= MAX_GAP; gapValue = (gapValue +
GAP_STEP)){
for (perCentage = 0.0; perCentage <= 1.0;perCentage = (perCentage
+0.1)){
for (numTrial = 0; numTrial < 5 ; numTrial ++){
Send packet sequence to the End Node;
printf("gap %d, percentage %d,Numtrial
%d\n",gapValue,perCentage,numTrial);
}
}
}
Suppose the percentage should be 0.0. 1.0, 2.0 . however the value is
0.0 , -1610612736
The numTrial should be 0, 1,2,3,4,, however the value is 0,1069128089.
Why, is my declariation sth wrong, if I delete the "static", same thing
happens.
Thanks for any comments.
The code I write is :
static int numTrial;
static float perCentage;
static int gapValue;
static int inValue;
for( gapValue = inValue; gapValue <= MAX_GAP; gapValue = (gapValue +
GAP_STEP)){
for (perCentage = 0.0; perCentage <= 1.0;perCentage = (perCentage
+0.1)){
for (numTrial = 0; numTrial < 5 ; numTrial ++){
Send packet sequence to the End Node;
printf("gap %d, percentage %d,Numtrial
%d\n",gapValue,perCentage,numTrial);
}
}
}
Suppose the percentage should be 0.0. 1.0, 2.0 . however the value is
0.0 , -1610612736
The numTrial should be 0, 1,2,3,4,, however the value is 0,1069128089.
Why, is my declariation sth wrong, if I delete the "static", same thing
happens.
Thanks for any comments.