GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) β€” delete-list πŸ’–

okay bestie, gather round, we're talking about delete-list from the 2gg manual, and honestly? it's giving "bye bye little element" energy πŸŽ€


✨ NAME ✨

delete-list β€” and it lives in the (linked-list) family πŸ¦‹


🎯 PURPOSE 🎯

Delete the current linked list element. that's it. that's the whole job. and it ATE πŸ’…


πŸ“ SYNTAX πŸ“

delete-list <list> [ status <status> ]

🌸 DESCRIPTION 🌸

so like, delete-list will delete the current element in the linked <list> β€” and heads up, that list has to be one you made with new-list, no cap.

and what's a "current element" you ask? 🫢 it's the one that statements like read-list and write-list are gonna act on. if you're confused about which one that is, go read position-list for the full tea on the current element. iykyk.

<status> (the one chilling inside the status clause) comes back as GG_OKAY if the element got deleted, or GG_ERR_EXIST if it couldn't delete it. and when does that happen? two scenarios, bestie:

  • the list is empty πŸ’€
  • the current list element is beyond the last element β€” like, for instance, if the end clause was used in a position-list statement 😭

now for the iconic part: once an element is deleted, the current element becomes either the next one (if the current element wasn't the last one) or the previous one (if the current element was the last one). the cursor literally just slides over like nothing happened. main character energy fr fr. ✨


πŸ“ EXAMPLES πŸ“

delete-list mylist status st

look at her go πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • Linked list
  • delete-list
  • get-list
  • new-list
  • position-list
  • purge-list
  • read-list
  • write-list
  • See all documentation

mwah πŸ’‹ that's the whole page, and yes, every single option, clause, status code and example is still in there β€” the facts did not change, only the vibe did, periodt.

this iconic little entry is from version $VERSION, dated $DATE β€” and the header said GOLF(2gg) with "Development" on it, so shoutout to the whole GOLF manual for keeping us fed. bye bestie, go delete something (an element, specifically) πŸ¦‹πŸ’–πŸŒˆ

πŸ“¦ where this page comes from