PX_GET_DATA_LONG(3)

πŸ’– PX_GET_DATA_LONG(3) πŸ’–

okay bestie, sit down, we're doing a manual page from the Library Functions Manual section and it's literally called PX_get_data_long β€” the "Get long data field" girlie. she's giving old-school Paradox database energy and honestly? iconic. πŸŽ€


✨ NAME ✨

PX_get_data_long β€” get that long data field, bestie πŸ’…


🌸 SYNOPSIS 🌸

#include <paradox.h>

int PX_get_data_long(pxdoc_t *pxdoc, char *data, int len, long *value)

πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is: she takes a data field exactly the way it's stored in the database file and converts it into a long integer for whatever host architecture you're on. no cap. and like β€” you should be using this function instead of poking at the data directly. please. for me. 🫢

data points to the start of the data field inside the record. and this is the part where you have to do math, sorry babe 😭 β€” it must be calculated by summing up all field length before the field to operate on, and then add it to the base pointer of the record. that's the whole recipe, fr fr.

Note: this function is deprecated and obsolete if PX_retrieve_record(3) is used. like, she's a legacy queen. still valid, still works, but if you're already using PX_retrieve_record(3) she's literally not needed. πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

  • 0 β€” if the value is NULL πŸ«₯
  • -1 β€” in case of an error, noooo 😭
  • 1 β€” otherwise, slay ✨

🌈 SEE ALSO 🌈

the whole squad, periodt. πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

this manual page was written by Uwe Steinmann uwe@steinmann.cx. giving main character documentation energy. πŸ‘‘


and that's the whole vibe check bestie β€” this page is from the Library Functions Manual collection, footer reads PX_GET_DATA_LONG(3), so if you ever forget where you found her, she's filed right there under that name. bye ily, go convert some longs responsibly πŸ’–βœ¨πŸ§š