![]() Mainly good news, the obstacles are being over come. I think an array of records will save a lot of time coding. But you'd need to write code to unlink a node, relink the other 2 nodes, and such. I did bump into this article on Linked Lists in Pascal which explains it pretty well.Īdvantages of a linked list over an array of records seems of course be that one can easier insert or remove elements. One would have to add some extra code to add or remove nodes, and code to walk through the nodes of the linked list. Again obviously not every situation is as suitable for this.Īlso note that with linked lists, one would use a record as well. But in a suitable situation, I just found that simply using records in a dynamic array, can be a lot easier. ![]() Working with linked lists still remains an option of course (I used to do this all the time in Turbo Pascal). You could add a field to the record to reference another record of course, or just use the index to access a record. / read an element (I presume you're familiar with records) from record 3 Actually I've used it for complex lists as well, but it's not always suitable for that. Well, you can use linked lists if you want, I'v done this in the past as well.īut you could also use a dynamic array or records (and set size or reset size with " setlength(array,number)")įor simple lists, this is what I use. So I'll overlook you code for now, unless you'd like me to look at something specific.Ĭoming back to your Linked List question. I think it's a dying art to build something yourself, versus buying something crappy from China. I do like what you're done with the Wind Energy and ScrapHeap Challenge. Which is probably just as poorly timed, and I always have to get out of bed to look at it / fix it. But I guess those are also the moments where I realize what went wrong. I hate it when that happens, especially when it wake me up in the middle of the night. Haha, no worries Jim - it happens to me as well, and I'm not 75 yet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |