MAT_VARDELETE(3)

✨ MAT_VARDELETE(3) ✨

okay bestie, pull up a chair πŸ’– this is a page from the Library Functions Manual, and it's about one very specific little function that does one very specific little thing. no cap.


πŸŽ€ NAME πŸŽ€

Mat_VarDelete β€” deletes a MAT variable from a file. that's it. that's the whole job. she's a simple queen and she knows it πŸ’…


🌸 SYNOPSIS 🌸

#include <matio.h>

int
Mat_VarDelete(mat_t *matfp, const char *name);

look at her. two arguments. no drama. iconic. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that this works is: Mat_VarDelete() takes the MAT variable called name and deletes it from the MAT file that's represented by the MAT file structure matfp. πŸ—‘οΈβœ¨

that's it!! it goes in, it finds the variable by name, and it's gone. not me being emotionally attached to a variable, couldn't be me πŸ™ˆ


πŸ’œ RETURN VALUES πŸ’œ

  • 0 β€” success, we ate, no crumbs, the variable is deleted πŸ’…
  • anything else β€” an error value gets returned instead 😭 something went sideways
bestie, the manual is very chill about it and just says "an error value is returned" β€” so like, don't assume it's a specific number, okay? check that it's 0 and you're golden. πŸ‘‘

and that's the whole page, periodt. 🫢

this one comes from Debian, dated October 20, 2017 β€” so if you're reading this in the future, yes, she's been serving this exact energy since 2017 and she's not changing. πŸ’–βœ¨πŸŒΈπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from