Subversion Repositories wimsdev

Rev

Rev 20 | Rev 2054 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !set parm=!replace internal \ by $$m_ in $wims_read_parm
  2. !distribute items $parm into t_,inputsize,prompt_
  3.  
  4. !if $printing=yes or $cmd=hint
  5.  !if $inputsize>0 and mc iswordof $(replystyle$i)
  6.   !if $prompt_=$empty
  7.    !set g_=!rows2lines $(replygood$i)
  8.    !set g_=!line 2 of $g_
  9.    !set prompt_=!item $inputsize of $g_
  10.   !endif
  11.   !imgrename <u>$prompt_</u>
  12.  !else
  13.   ___________
  14.  !endif
  15.  !exit
  16. !endif
  17.  
  18. !if $wims_read_parm=$empty
  19.  !exit
  20. !endif
  21.  
  22. !set n_=!char 2 to -1 of $t_
  23. !set t_=!char 1 of $t_
  24. !set t_=!lower $t_
  25. !set t_=!translate a to r in $t_
  26. !set n_=!text select 0123456789()+-* in $n_
  27. !set n_=$[$n_]
  28. !bound n_ between integer 1 and 100 default $
  29. !if $t_ notitemof r,c or $n_=$empty
  30.  !exit
  31. !endif
  32.  
  33. !if $t_=c and $(choicelist$n_)=$empty or\
  34.         $t_=r and $(replygood$n_)=$empty
  35.  !exit
  36. !endif
  37.  
  38. !if $t_$n_ notitemof $embedded
  39.  !set embedded=!append item $t_$n_ to $embedded
  40.  !set embcnt=!itemcnt $embedded
  41. !endif
  42. !set i=$n_
  43.  
  44. !if $q_form=yes
  45.  !if $t_=c
  46.   !set p_=$ch_choose,$(choicelist$i)
  47.   !if $idontknow>0 and noidontknow notwordof $(choiceoption$i)
  48.    !set p_=$p_,$ch_noidea
  49.   !endif
  50.   !if $qcmgood<1
  51.    !set p_=$p_,$ch_none
  52.   !endif
  53.   !set N_=!itemcnt $p_
  54.   !set C_=$(choice$i)
  55.   !if debug iswordof $m_oefenv
  56.    !set replydefaulted=yes
  57.    !if $oef_default=yes
  58.     !set T_=!positionof item $(choicegood$i[1]) in $(choicelist$i)
  59.     !default choice$i=$(T_[1])
  60.    !endif
  61.   !endif
  62.   !formselect choice$i from 0 to $[$N_-1] prompt $p_
  63.   !set choice$i=$C_
  64.  !else
  65.   !read anstype/$(replytype$i).input noprompt
  66.  !endif
  67. !else
  68.  !distribute item green,red,blue into colorr_good,colorr_bad,colorr_forget
  69.  !set cl=blue
  70.  !if $t_=c
  71.   !set cl=$(colorr_$(diachoice$i))
  72.   !set p_=!item $(choice$i) of $(choicelist$i),$ch_noidea,$ch_none
  73.   !set choicename$i=[$embcnt]
  74.  !else
  75.   !default reply_$i=$(reply$i)
  76.   !set p_=$(reply_$i)
  77.   !if dprompt iswordof $(replystyle$i)
  78.    !set reply_$i=$(reply__$i)
  79.   !endif
  80.   !if mc iswordof $(replystyle$i) and $inputsize!=$empty and $inputsize >= 1 and $inputsize <= 1000
  81.    !set tt=!rows2lines $(replygood$i)
  82.    !distribute lines $tt into ts,tt
  83.    !default prompt_=!item $inputsize of $tt
  84.    !set p_=$prompt_
  85.    !reset tv
  86.    !if $(replytype$i)  iswordof mark
  87.      !set tv=$(reply$i)
  88.    !else
  89.     !for r_ in $(reply$i)
  90.      !set tu=!positionof item $r_ in $tt
  91.      !set tv=!append item $tu to $tv
  92.     !next r_
  93.    !endif
  94.    !if $inputsize notitemof $tv
  95.     !if $inputsize isitemof $ts and $(replytype$i) iswordof mark
  96.      !set cl = $colorr_forget
  97.      !imgrename <b><tt><u><font color=$cl>$p_</font></u></tt></b>
  98.     !else
  99.      !imgrename <b><tt><u>$p_</u></tt></b>
  100.     !endif
  101.     !exit
  102.    !endif
  103.   !endif
  104.   !if $(replytype$i) iswordof code
  105.    !set p_=!replace internal & by &amp; in $p_
  106.    !set p_=!replace internal &amp;#36; by &#36; in $p_
  107.   !set p_=!replace internal < by &lt; in $p_
  108.    !set p_=<pre>$p_</pre>
  109.   !endif
  110.   !set tt=!word 1 of $(replygood$i)
  111.   !if $tt!=?analyze
  112.    !set cl=$(colorr_$(diareply$i))
  113.    !if $(replytype$i) iswordof mark
  114.      !if $inputsize isitemof $ts
  115.      !set cl = $colorr_good
  116.      !else
  117.      !set cl = $colorr_bad
  118.      !endif
  119.     !endif
  120.   !else
  121.    !set embedded_analyze=!append item $i to $embedded_analyze
  122.    !set embedded_bracket=$embedded_bracket [$embcnt]
  123.   !endif
  124.   !set replyname$i=[$embcnt]
  125.  !endif
  126.  !if $(replytype$i) notwordof correspond
  127.   !set instex_color=$cl
  128.   !imgrename <b><tt><font color=$cl>$p_</font></tt></b><sup><small>[$embcnt]</small></sup>
  129.   !else
  130.   !imgrename $p_<sup><small>[$embcnt]</small></sup>
  131.  !endif
  132.  !set instex_color=black
  133.  !if $(replytype$i) iswordof correspond
  134.   !set noshow$i=yes
  135.  !endif
  136. !endif
  137.  
  138.