Hello Ace,
>>>
Ace
For I = 1 to 16....
GOSUB Thesub
PULSIN input,1, value
IF (value < A) OR ( value > B ) then
error = 1 ( it's a red led ! )
value1 = ...
value2 = ...
GOTO Start
ENDIF
result = result + value
NEXT I
result = result >> 4 ( the mean value ....)
<<<<
REwrite it as the following:; I think this will solve your problem...This is assuming you have a goto start BEFORE your subroutine...like after your
result = result >> 4 ( the mean value ....) statement.
i=1
while(i<17)
GOSUB Thesub
PULSIN input,1, value
IF (value < A) OR ( value > B ) then
error = 1 ( it's a red led ! )
value1 = ...
value2 = ...
i=18
else
result = result + value
endif
I=I+1
endwhile
if I>18 then goto start
result = result >> 4 ( the mean value ....)
Last edited by Dwayne; - 23rd June 2005 at 20:36.
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks