# The Clam Library: Version 1 Clam is a library for implementing object oriented patterns into Scratch. ## Infrequently asked questions 1. Will there be a tutorial? Yes, hopefully. 2. Will there be a demo? Yes, hopefully. 3. Where do I report bugs? In the comments. 4. What structure did you use for your code? Clam is written to comply with @Aspirus's standard for readable code. ## Usage Clam is made to be as complex as you need it to be. The Clam storage can be handled as a list, then be expanded into a dictionary, then a dictionary with dictionaries inside (nodes). To begin, allocate some items with `Clam: Init`. The `allocate` argument defines maximum amount items you want to be able to store. `root_name` is the key of the last parent of all items in your tree. The value does not change anything about how Clam functions, so you may leave it at something like `root`. To create a data point, use `Clam: StoreData` to assign data to an index in your root node. If you want to fetch the items in your directory, use `Clam: FetchKeys`, which will list all keys in your node in the list `Clam: io`. `Clam: io` is where the output of all of Clam's fetching operations end up. You may want to create a node with some items in it. To do this, use `Clam: StoreNode` to create a node - then, enter that node with `Clam: EnterLocallyKey`, and the key which you named your newly created node with. You have now moved into your node, and you can create a data point like you did earlier. If you want to check where you are currently, check the variable `Clam: position`. It holds the global index of the node you are currently in. If you want to get the name of the node you are currently in, get item `Clam: position` of the list `Clam: key`. This is as much as I'm going to write out for now. Check back later for a complete tutorial on Clam. ## Future versions I plan to update Clam with some new features in the future. Clam 1 is quite robust, but for certain applications some new features may be needed. The features below are sorted by priority: 1. Re-keyable items. When an item has had a key assigned to it, the key cannot be changed. 2. Optional automatic memory allocation. Clam is useful when the growth of memory is predictable. When data usage may expand in undetermined ways, Clam 1 is not safe.