![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| The definition for List is wrong, and the example for Array is wrong. Mark Guzdial |
| No, it doesn't. That makes a list with one element, not an array. Mark Guzdial |
| Range actually creates a sequence. Arrays and lists are both sequences. Sounds and strings are the only arrays we've used in this class. Mark Guzdial |
| An array consists of consecutive mailboxes in memory and just holds simple values like samples or characters. A list is a more sophisticated data structure that can contain all kinds of things including samples, characters, pixels (remember that pixels actually have THREE values in each one), and even sublists. For example, lists can represent hierarchical data structures like trees, while arrays cannot (easily). Mark Guzdial |
| Sure, I agree that that's an example of accessing an array. Mark Guzdial |
| Nope. Array is the data structure for a SOUND (not music). Pictures are represented as a matrix of pixels. Mark Guzdial |
| AKA a 2-D array. Mark Guzdial |
| Exectuable? Think "hierarchy." Mark Guzdial |
| VERY nice! Mark Guzdial |
| DITTO! Very nice! Mark Guzdial |