Rev 6769 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
| 13594 | bpr | 2 | !goto proc |
| 20 | reyssat | 3 | !endif |
| 4158 | bpr | 4 | |
| 4351 | bpr | 5 | slib_author=Georges, Khaznadar |
| 20 | reyssat | 6 | slib_license=GPL |
| 4158 | bpr | 7 | |
| 20 | reyssat | 8 | slib_example= H2 + O2 -> H2O, 2H2 + O2 -> 2H2O \ |
| 475 | georgesk | 9 | 2H2 + O2 -> 2H2O, 2H2_g + O2_g -> 2H2O \ |
| 20 | reyssat | 10 | H2 + 1/2 O2 -> H2O, 2H2 + O2 -> 2H2O \ |
| 11 | Fe + Cu^2+ -> Fe^2+ + Cu, Fe + Cu^2+ -> Fe^2+ + Cu \ |
||
| 12 | Ag^+ + 1/2 SO4^2- -> 1/2 Ag2(SO4), 2Ag^+ + SO4^2- -> Ag2(SO4) |
||
| 3265 | bpr | 13 | slib_require=chemeq |
| 20 | reyssat | 14 | !exit |
| 15 | |||
| 16 | :proc |
||
| 17 | |||
| 18 | !reset slib_parm, slib_student_eq, slib_correct_eq, slib_ok_reply, slib_ko_reply, slib_st_eq, slib_co_eq |
||
| 19 | |||
| 20 | slib_parm=!item 1 to 4 of $wims_read_parm |
||
| 21 | !distribute item $slib_parm into slib_student_eq, slib_correct_eq, slib_ok_reply, slib_ko_reply |
||
| 22 | |||
| 23 | !default slib_ok_reply=good |
||
| 24 | !default slib_ko_reply=bad |
||
| 25 | |||
| 6769 | georgesk | 26 | slib_out=$slib_ko_reply |
| 27 | |||
| 20 | reyssat | 28 | chemeq_option=n |
| 29 | |||
| 30 | slib_st_eq=!exec chemeq $slib_student_eq |
||
| 6769 | georgesk | 31 | !if ERROR isin $wims_exec_error |
| 32 | !goto end |
||
| 33 | !endif |
||
| 34 | |||
| 20 | reyssat | 35 | slib_co_eq=!exec chemeq $slib_correct_eq |
| 6769 | georgesk | 36 | !if ERROR isin $wims_exec_error |
| 37 | !goto end |
||
| 38 | !endif |
||
| 20 | reyssat | 39 | |
| 40 | !if $slib_st_eq = $slib_co_eq |
||
| 41 | slib_out=$slib_ok_reply |
||
| 42 | !endif |
||
| 43 | |||
| 6769 | georgesk | 44 | :end |
| 20 | reyssat | 45 | !reset chemeq_option |