PX_PUT_DATA_BYTE(3)

🌸 PX_PUT_DATA_BYTE(3) 🌸

okay so bestie, you've opened the Library Functions Manual and this page is entirely about PX_put_data_byte β€” the teeny tiny function that tucks one (1) single byte into a data field. no cap. πŸ’–


✨ NAME ✨

PX_put_data_byte β€” put a value into a byte data field 🫢


🌈 SYNOPSIS 🌈

#include <paradox.h>

void PX_put_data_byte(pxdoc_t *pxdoc, char *data, int len, char value)

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea β˜•: this one converts a char (which is just a byte, same thing bestie, we don't discriminate) into a value for a data field as it is stored in the database file. like, the actual on-disk representation. the real one. πŸ”₯

✨ the way that you should use this function instead of accessing the record data directly… obsessed. genuinely. let her cook. 🫢

she can also be used to store boolean values. iconic behaviour honestly πŸ‘‘

now for the part where people get lost, and I am not letting that happen to you 😭:

data points to the start of the data field in the record. and you find that start by summing up all the field lengths of every field that comes before the field you're operating on, and then adding that total to the base pointer of the record. that's the whole vibe check. do the math, get the pointer, slay. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸŽ€ AUTHOR πŸŽ€

this manual page was written by Uwe Steinmann uwe@steinmann.cx. periodt. πŸ’œ


and that's the whole thing bestie β€” that footer tag PX_PUT_DATA_BYTE(3) is just the page signing its own name from the Library Functions Manual, no date attached, so go forth and put bytes in fields πŸ¦‹βœ¨πŸ’–