Subversion Repositories wimsdev

Rev

Rev 4158 | Go to most recent revision | Details | 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
4
slib_title=Take a random field of a record file
5
slib_parms=1\
6
,name of the record file in the module
7
slib_author=Gang Xiao
8
slib_out=the random field (empty if error)
9
slib_comment=The length of the record file can grow very big.
10
!exit
11
 
12
:proc
13
!if (...adm/ isin ...$module and / isin $wims_read_parm) \
14
	or .. isin $wims_read_parm or $wims_read_parm=$empty
15
 !exit
16
!endif
17
slib_fname=!items2words $wims_read_parm
18
slib_fname=!word 1 of $slib_fname
19
slib_n=!recordcnt $slib_fname
20
!if $slib_n<1
21
 slib_out=
22
 !exit
23
!endif
24
slib_n=!randint 1,$slib_n
25
slib_out=!record $slib_n of $slib_fname