1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
option:distinct_inputs repeat symbols=" "
!reset dd1, good1
dd=!declosing $(reply$i)
!if ; isin $dd
test=NaN
!exit
!endif
!if , notin $dd
dd=!words2items $dd
!endif
!if repeat iswordof $(replyoption$i) or distinct_inputs iswordof $(replyoption$i)
dd1=!sort items $dd
!endif
dd=!listuniq $dd
!default dd1=$dd
reply$i={$dd1}
m_reply$i=$dd1
!if $wims_read_parm=nocompare
!exit
!endif
good=!declosing $(replygood$i)
!if , notin $good
good=!words2items $good
!endif
!if repeat iswordof $(replyoption$i) or distinct_inputs iswordof $(replyoption$i)
good1=!sort items $good
!endif
good=!listuniq $good
!default good1=$good
replyGood$i={$good1}
dt=!listintersect $good and $dd
n1=!itemcnt $good
n2=!itemcnt $dd
n3=!itemcnt $dt
!if $good1 issametext $dd1
test_rep_=1
!else
test_rep_=0
!endif
!if $n1!=$n2 and (repeat notwordof $(replyoption$i) and distinct_inputs notwordof $(replyoption$i))
badsize$i=true
!endif
!if $n1=$n2 and $n2=$n3
!if $test_rep_=1
diareply$i=good
!advance freegot
!else
diareply$i=good
!advance freegot
!if repeat iswordof $(replyoption$i)
partialgood$i=yes
!endif
!endif
!else
diareply$i=bad
!endif
|