Rev 4349 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
2 | !goto proc |
||
3 | !endif |
||
4158 | bpr | 4 | |
4349 | bpr | 5 | slib_author=Gang, XIAO |
4158 | bpr | 6 | |
5256 | bpr | 7 | slib_example=5,item, a,b,c,d,e,f,g\ |
8 | 5,word, ab cd ef e f g\ |
||
9 | 5,row, a;b;c;d;e;f\ |
||
10 | 5,row, a;b;c |
||
20 | reyssat | 11 | !exit |
12 | |||
13 | :proc |
||
14 | !distribute items $wims_read_parm into slib_n, slib_type |
||
15 | slib_data=!item 3 to -1 of $wims_read_parm |
||
16 | slib_type=!lower $slib_type |
||
17 | !bound slib_type within item,items,word,words,row,rows,line,lines default item |
||
18 | |||
19 | !if $slib_type iswordof item items |
||
20 | slib_data=!nonempty items $slib_data |
||
21 | slib_tot=!itemcnt $slib_data |
||
22 | !bound slib_n between integer 1 and $slib_tot |
||
23 | slib_list=!shuffle $slib_tot |
||
24 | slib_out=!item $(slib_list[1..$slib_n]) of $slib_data |
||
25 | !exit |
||
26 | !endif |
||
27 | |||
28 | !if $slib_type iswordof word words |
||
29 | slib_tot=!wordcnt $slib_data |
||
30 | !bound slib_n between integer 1 and $slib_tot |
||
31 | slib_list=!shuffle $slib_tot |
||
32 | slib_out=!word $(slib_list[1..$slib_n]) of $slib_data |
||
33 | !exit |
||
34 | !endif |
||
35 | |||
36 | !if $slib_type iswordof row rows |
||
37 | slib_data=!nonempty rows $slib_data |
||
38 | slib_tot=!rowcnt $slib_data |
||
39 | !bound slib_n between integer 1 and $slib_tot |
||
40 | slib_list=!shuffle $slib_tot |
||
41 | slib_out=!row $(slib_list[1..$slib_n]) of $slib_data |
||
42 | !exit |
||
43 | !endif |
||
44 | |||
45 | !if $slib_type iswordof line lines |
||
46 | slib_data=!nonempty line $slib_data |
||
47 | slib_tot=!linecnt $slib_data |
||
48 | !bound slib_n between integer 1 and $slib_tot |
||
49 | slib_list=!shuffle $slib_tot |
||
50 | slib_out=!line $(slib_list[1..$slib_n]) of $slib_data |
||
51 | !exit |
||
52 | !endif |
||
53 |