home *** CD-ROM | disk | FTP | other *** search
/ MASPC 1 / MASPC_1.iso / CursoWordI / PTESTFI.DXR / 00002.ls next >
Encoding:
Text File  |  1998-07-20  |  1.4 KB  |  46 lines

  1. on docargalista fichatest, tope
  2.   set test to 0
  3.   set solucion to 0
  4.   set correcta to 0
  5.   set total to the number of lines in field fichatest
  6.   repeat with i = 1 to total
  7.     set aux to word 1 of line i of field fichatest
  8.     case aux of
  9.       "#TEST":
  10.         set numerotest to word 2 of line i of field fichatest
  11.         set test to 1
  12.         set solucion to 0
  13.         set correcta to 0
  14.       "#RES":
  15.         set resp to word 2 of line i of field fichatest
  16.         set solucion to 1
  17.         set test to 0
  18.         set correcta to 0
  19.       "#SOL":
  20.         set letra to word 2 of line i of field fichatest
  21.         set correcta to 1
  22.         set test to 0
  23.         set solucion to 0
  24.         Question.Sol.Set(fichatest, value(numerotest), letra)
  25.       EMPTY:
  26.         set hola to 1
  27.       otherwise:
  28.         if test = 1 then
  29.           set texto to Question.Enun.get(fichatest, value(numerotest))
  30.           set nuevotexto to texto & line i of field fichatest
  31.           Question.Enun.Set(fichatest, value(numerotest), nuevotexto)
  32.         end if
  33.         if solucion = 1 then
  34.           case resp of
  35.             "A":
  36.               Question.OpA.Set(fichatest, value(numerotest), line i of field fichatest)
  37.             "B":
  38.               Question.OpB.Set(fichatest, value(numerotest), line i of field fichatest)
  39.             "C":
  40.               Question.OpC.Set(fichatest, value(numerotest), line i of field fichatest)
  41.           end case
  42.         end if
  43.     end case
  44.   end repeat
  45. end
  46.