home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
compiler
/
doobject
/
collect.do
< prev
next >
Wrap
Text File
|
1991-07-16
|
628b
|
21 lines
/*
this is a demonstration of dObject's Collection class
*/
a = [5,3,9,5,100,44,5];
? "Collection is ",a;
? "added to itself is ",a+a;
? "length is ",len(a);
? "reversed is ",reverse(a);
? "third element is ",at(a,3);
? "last element is ",last(a);
? "with 100 removed is ",remove(a,100);
? "substitute 1005 for 5 is ",replace(a,5,1005);
? "is 44 in collection ?: ",44 $ a;
? "sorted array is ",sort(a);
? "unique array is ",unique(a);
? "unique sorted Collection is ",sort(unique(a));
? "sum of elements is ",sum(a);
? "minimum value is ",min(a);
? "maximum value is ",max(a);
? "average value is ",avg(a);