$c1=2
$c2=0
$c3=-10
$c4=0
$c5=0
$c6=1
$c7=0
$c8=6
$c9=2
$c10=34
$string=STRCONCAT($c1,":",$c2,":",$c3,":",$c4,":",$c5,":",$c6,":",$c7,":",$c8,":",$c9,":",$c10)
SUB(max_opred)
$cut=$string
$max=0
WHILE(INT(STRPOS($cut,":"))!0)
$num=INT(STRCUT2($cut,1,STRPOS($cut,":")-1))
$cut=STRCUT2($cut,STRPOS($cut,":")+1,99999)
IF($num > $max)
$max=$num
END_IF
END_CYC
IF(INT($cut) > $max)
$max=INT($cut)
END_IF
IF(STRPOS($string,$max)=1)
$string=STRREPLACE($string, STRCONCAT($max,":"), "")
ELSE
$string=STRREPLACE($string, STRCONCAT(":",$max), "")
END_IF
END_SUB
max_opred()
$max1=$max
max_opred()
$max2=$max
max_opred()
$max3=$max
max_opred()
$max4=$max
max_opred()
$max5=$max
LOGWRITE ("max1= ",$max1,", max2= ",$max2,", max3= ",$max3,", max4= ",$max4,", max5= ",$max5)
HALT