In order to utilize the other fragments, just replace
ORIGIN '~beta/basiclib/betaenv'; INCLUDE '~beta/containers/sets' --- program: descriptor --- (# ... recordBag: @multiSet(# element:: record #); aRecord: @record; aPerson: @person; (* person is a subpattern of record *) ... do ... recordBag.init; ... aPerson[] -> recordBag.insert; ... aRecord[] -> recordBag.insert; ... recordBag.scan(# where:: (# current.key<3000 -> value #) do current.print #); (* prints all records in recordBag that has a key less that * 3000. It is assumed that record implements a virtual print * operation *) ... #)
with e.g.
INCLUDE '~beta/containers/sets'
and in order to use more than one container fragment, just insert several INCLUDEs:
INCLUDE '~beta/containers/hashTable'
Note that since the container fragments has ORIGIN in betaenv, the above is equivalent to:
INCLUDE '~beta/containers/sets'; INCLUDE '~beta/containers/hashTable'
ORIGIN '~beta/containers/sets' --- program: descriptor --- (# ... recordBag: @multiSet(# element:: record #); ... do ... ... #)
Container Libraries - Reference Manual | © 1992-2002 Mjølner Informatics |
[Modified: Thursday October 19th 2000 at 12:51]
|