# The Clam Library: Version 1.1 Clam is a library for implementing object oriented patterns into Scratch. Clam is as simple as you need it to be. Use it in a quad-tree representation, JSON parser, SVG renderer, or any other object data structure. ## 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. ## Version history ### 1.1 Values and keys can now be changed. Introduced a config variable for automatically allocating items. Switched from a find item# of list function to a queue of unallocated items to hopefully speed up allocation. Fixed a bug which broke functionality of the `Clam: EnterKey` function. ### 1 Release. ## 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: All tackled in 1.1!