weigh
; ;
repeat
   ,
  if   then
    ;
  else
    ;
  endif
  
until     or ( no)
  
clearq
; ;
repeat
  
  
  
until  
Algorithm 1: Algorithms of weigh and clearq.