unibi_set_num(3)

✨ NAME ✨

unibi_get_bool, unibi_set_bool, unibi_get_num, unibi_set_num, unibi_get_str, unibi_set_str β€” bestie, this is how you get and set the capabilities of a terminal object πŸ’–

It's all part of unibilium, manual section 3, so like… library-call territory. iykyk πŸŽ€


🌸 SYNOPSIS 🌸

#include <unibilium.h>

int unibi_get_bool(const unibi_term *ut, enum unibi_boolean b);
void unibi_set_bool(unibi_term *ut, enum unibi_boolean b, int x);

int unibi_get_num(const unibi_term *ut, enum unibi_numeric n);
void unibi_set_num(unibi_term *ut, enum unibi_numeric n, int x);

const char *unibi_get_str(const unibi_term *ut, enum unibi_string s);
void unibi_set_str(unibi_term *ut, enum unibi_string s, const char *x);

πŸ’… DESCRIPTION πŸ’…

Okay so the whole vibe here is get/set β€” you're grabbing and assigning boolean, numeric, and string capabilities. That's the entire job. Three flavours, six functions, no cap 🫢

The get ones hand you the value, the set ones put a value in. Matching set, slay.

the absent-value situation 😭

Not every capability is gonna be there, and unibilium has specific ways of telling you that:

  • Absent numeric capabilities are represented as -1.
  • Absent string capabilities as "NULL".

So if you get a -1 back, that's not a real number, that's the void speaking. πŸ’€

the one thing you NEED to know about unibi_set_str 🚨

Note that unibi_set_str simply stores the pointer it is given; it will not free x or make a copy of the string.

Read that again, bestie, because it's giving shared custody of a pointer. It does not free x, and it does not make a copy. It just… holds onto what you gave it. So keep that memory alive and well-behaved, okay? πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


That's the whole page, fr fr. Written up for unibilium-2.1.4, dated 2026-09-07 β€” go forth and set your numerics, icon πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from