home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rox.zip
/
testcoll.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-31
|
1KB
|
70 lines
/*------------------------------------------------------------------
* test1.cmd :
*------------------------------------------------------------------
* 08-20-93 originally by Patrick J. Mueller
*------------------------------------------------------------------*/
parse arg class roxName .
if (class = "") then
class = "list"
if (roxName = "") then
roxName = class
say "testing '"class"' class"
if RxFuncQuery("RoxLoadFuncs") then
do
rc = RxFuncAdd("RoxLoadFuncs","Rox","RoxLoadFuncs")
rc = RoxLoadFuncs()
end
rc = time("r")
rc = RoxLoad(class".rox")
coll1 = RoxCreate(class)
coll2 = RoxCreate(class)
items = 10
do i = 1 to items
say "adding to coll1:" i
g = .add(coll1,i)
end
say
do i = 1 to items
say "adding to coll2:" i * i
g = .add(coll2,i*i)
end
say
say "testing in coll1 for 3"
if (0 = .includes(coll1,3)) then
say "error finding 3 in coll1"
say "testing in coll2 for 9"
if (0 = .includes(coll2,9)) then
say "error finding 9 in coll2"
say
say "printing coll1"
say .do(coll1,"!item","!coll=!coll !item","!coll=''","return space(!coll)")
say
say "printing coll2"
say .do(coll2,"!item","!coll=!coll !item","!coll=''","return space(!coll)")
say
rc = RoxDestroy(coll1)
rc = RoxDestroy(coll2)
elapsed = time("e")
say
say "Total processing time:" elapsed "seconds".