Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 16113 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | - | ||
2 | !for t in context,result |
1 | !for t in context,result |
3 | !if $(ask$t)>1 and $($(t)list)!=$empty |
2 | !if $(ask$t)>1 and $($(t)list)!=$empty |
4 | rep=!trim $(rep$t) |
3 | rep=!trim $(rep$t) |
5 | !if $rep=$empty or $rep<1 |
4 | !if $rep=$empty or $rep<1 |
6 | error=empty_data |
5 | error=empty_data |
- | 6 | !exit |
|
- | 7 | !endif |
|
- | 8 | N=!itemcnt $(sh$t) |
|
- | 9 | rep=$[floor($rep)] |
|
- | 10 | !if NaN isin $rep or $rep<1 or $rep>$N |
|
- | 11 | error=bad_data |
|
- | 12 | !exit |
|
- | 13 | !endif |
|
- | 14 | !if $rep!=$(good$t) |
|
- | 15 | error=bad_reply |
|
- | 16 | !advance penalty |
|
7 | !exit |
17 | !exit |
- | 18 | !endif |
|
8 | !endif |
19 | !endif |
9 | N=!itemcnt $(sh$t) |
- | |
10 | rep=$[floor($rep)] |
- | |
11 | !if NaN isin $rep or $rep<1 or $rep>$N |
- | |
12 | error=bad_data |
- | |
13 | !exit |
- | |
14 | !endif |
- | |
15 | !if $rep!=$(good$t) |
- | |
16 | error=bad_reply |
- | |
17 | !advance penalty |
- | |
18 | !exit |
- | |
19 | !endif |
- | |
20 | !endif |
- | |
21 | !next t |
20 | !next t |
22 | - |