Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

store-clearcat! clears a category field in a data store. NOT all the elements from that category

Parameter Description
store The store name
category Category which is cleared

Example

Example 1: Create a store, set some values, clear a category, then show that the category is indeed empty while the value is still there.

> (define store (make-store "main"))
> (store-set! store "HR" 78 "vitals")        
> (store-set! store "SpO2" 100 "vitals")  
> (store-listcat store "vitals")
(("HR" 78) ("SpO2" 100))
> (store-clearcat store "vitals")
> (store-listcat store "vitals")
()
> (store-ref store "HR")
78
Clone this wiki locally