Subversion Repositories wimsdev

Rev

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

  1. !distribute items $wims_read_parm into n_,1_,2_,3_,4_,5_
  2. !if NaN isin $[$n_] or $n_<1 or $n_>$methparmcnt
  3.  !exit
  4. !endif
  5.  
  6. !set t_=!item $n_ of $methparmtype
  7. !distribute words $t_ into t_,p_
  8. !if $t_ iswordof number parm function text choice
  9.  !goto $t_
  10. !else
  11.  !goto text
  12. !endif
  13.  
  14. :number
  15.  !default 1_=10
  16.  :input
  17.  <input size=$1_ name=methparm$n_ value="$(methparm$n_)">
  18. !exit
  19.  
  20. :function
  21.  !default 1_=22
  22.  !goto input
  23.  
  24. :text
  25.  !default 1_=30
  26.  !goto input
  27.  
  28. :choice
  29.  !formselect methparm$n_ from 1 to $p_ prompt $methchoiceprompt
  30. !exit
  31.  
  32. :parm
  33.  !set N_=!linecnt $(mtobj$n_)
  34.  !reset P_
  35.  !if $N_>1 or ($N_=1 and $n_ isitemof $methparmrelax)
  36.   !for i=1 to $N_
  37.    !set l=!line $i of $(mtobj$n_)
  38.    !set l=!item 2 to -1 of $l
  39.    !set l=!items2words $l
  40.    !set P_=!append item $l to $P_
  41.   !next i
  42.   !set P_=!replace internal < by &lt; in $P_
  43.   !set P_=!replace internal > by &gt; in $P_
  44.   !if $n_ isitemof $methparmrelax
  45.    !set p0=$ch_optional
  46.   !else
  47.    !set p0=$ch_choose
  48.   !endif
  49.   !formselect methparm$n_ from 0 to $N_ prompt $p0,$P_
  50.  !else
  51.   !if $N_=1
  52.    <input type=hidden name=methparm$n_ value=1>
  53.    !set l=!item 2 to -1 of $(mtobj$n_)
  54.    !set l=!items2words $l
  55.    !insmath $l
  56.   !else
  57.    <tt>$ch_optional</tt>
  58.   !endif
  59.  !endif
  60. !exit
  61.  
  62.