File: ans.proc

package info (click to toggle)
wims 2%3A4.30%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 185,332 kB
  • sloc: xml: 366,687; javascript: 120,570; java: 62,170; ansic: 61,221; sh: 7,747; perl: 3,939; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (26 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (3)
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
!distribute words $wims_read_parm into ans_1, ans_2

ans_type=$(replytype$ans_1)
!if symtext iswordof $(replyoption$ans_1)
  ans_style=!defof anstyle in anstype/$ans_type.input
  !if symtext iswordof $ans_style
    ans_type=symtext
  !endif
!endif

ans_w=$[$(replyweight$ans_1)]
!if $(replyweight$ans_1)!=$empty and NaN notin $ans_w and Inf notin $ans_w \
	  and $ans_w!=1 and nocompare notwordof $ans_2
  ans_got=$freegot
  prec_got=$precgood
  weightadjust=$[$weightadjust+$ans_w-1]
  !read anstype/$ans_type $ans_2
  ans_this=$[$freegot-$ans_got]
  prec_this=$[$precgood-$prec_got]
  !if $prec_this>0
    ans_this=$[$precweight*$prec_this]
  !endif
  gotadjust=$[$gotadjust+$ans_this*($ans_w-1)]
!else
  !read anstype/$ans_type $ans_2
!endif