Subversion Repositories wimsdev

Rev

Rev 12316 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12316 Rev 12555
Line 7... Line 7...
7
!! update_field : is the number of the field to be modified.
7
!! update_field : is the number of the field to be modified.
8
!! update_content : new content of the line
8
!! update_content : new content of the line
9
number_field=10
9
number_field=10
10
ecnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sheet
10
ecnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sheet
11
!for e=1 to $ecnt
11
!for e=1 to $ecnt
12
 exo_$e=!record $e of wimshome/log/classes/$wims_class/sheets/.sheet$sheet
12
  exo_$e=!record $e of wimshome/log/classes/$wims_class/sheets/.sheet$sheet
13
 exo_$e=!line 1 to $number_field of $(exo_$e)\
13
  exo_$e=!line 1 to $number_field of $(exo_$e)\
14
\
14
\
15
\
15
\
16
\
16
\
17
\
17
\
18
\
18
\
Line 22... Line 22...
22
\
22
\
23
\
23
\
24
 
24
 
25
!next e
25
!next e
26
!if $update_field>=0
26
!if $update_field>=0
27
 !if $update_field>0
27
  !if $update_field>0
28
  tmp=!linecnt $(exo_$exo)
28
    tmp=!linecnt $(exo_$exo)
29
  !if $update_field > $tmp
29
    !if $update_field > $tmp
30
   !for tmp2 = 1 to $[$update_field-$tmp]
30
      !for tmp2 = 1 to $[$update_field-$tmp]
31
    exo_$exo=!append line $ $ to $(exo_$exo)
31
        exo_$exo=!append line $ $ to $(exo_$exo)
32
   !next
32
      !next
-
 
33
    !endif
-
 
34
    exo_$exo=!replace line number $update_field by $update_content in $(exo_$exo)
-
 
35
  !else
-
 
36
    exo_$exo=$update_content
33
  !endif
37
  !endif
34
  exo_$exo=!replace line number $update_field by $update_content in $(exo_$exo)
-
 
35
 !else
-
 
36
  exo_$exo=$update_content
-
 
37
 !endif
-
 
38
!endif
38
!endif
39
!writefile wimshome/log/classes/$wims_class/sheets/.sheet$sheet
39
!writefile wimshome/log/classes/$wims_class/sheets/.sheet$sheet
40
!for e=1 to $ecnt
40
!for e=1 to $ecnt
41
 !if $e!=$exo or $update_field>=0
41
  !if $e!=$exo or $update_field>=0
42
  ef=!line 1 to $number_field of $(exo_$e)
42
    ef=!line 1 to $number_field of $(exo_$e)
43
  !appendfile wimshome/log/classes/$wims_class/sheets/.sheet$sheet :$ef
43
    !appendfile wimshome/log/classes/$wims_class/sheets/.sheet$sheet :$ef
44
 !endif
44
  !endif
45
!next e
45
!next e