PX_GET_DATA_SHORT(3)
π PX_GET_DATA_SHORT(3) π
okay bestie, so this one lives in the Library Functions Manual section, and it's literally called PX_get_data_short. Yes it's a 3, yes that means C library, yes we're doing this. Let's get into it π«Ά
β¨ NAME β¨
PX_get_data_short β grab a value out of a short data field, no cap π
πΈ SYNOPSIS πΈ
#include <paradox.h>
int PX_get_data_short(pxdoc_t *pxdoc, char *data, int len, short int *value)
π¦ DESCRIPTION π¦
So what this does is it takes a data field exactly how it's stored in the database file and converts it into a short integer for whatever architecture your host is running. Which is the whole point β please use this function instead of poking at the data directly, okay? Direct access is not the vibe, this is the vibe. β¨
data points to the start of the data field inside the record. And how do you figure out where that is? You gotta add up all the field lengths of every field that comes before the field you're trying to operate on, and then add that sum to the base pointer of the record. It's giving arithmetic homework but make it β¨data structuresβ¨.
β οΈ Note, and this one matters: This function is deprecated and obsolete if you're using PX_retrieve_record(3). Like, if you're already calling that, you do not need this. Periodt. π
π RETURN VALUE π
0β the value is NULL, nothing to see here π-1β bestie, there was an error π1β otherwise! we ate π₯
π SEE ALSO π
the whole little squad, obsessed π
π AUTHOR π
This manual page was written by Uwe Steinmann uwe@steinmann.cx. slay, thank you for your service π«‘β¨
okay that's the whole thing!! this page is from the Library Functions Manual, and yeah, the footer just says PX_GET_DATA_SHORT(3) right back at you β the classic little mirror moment at the bottom of every manpage π π¦ bye bestie, go convert some short data fields π
π¦ where this page comes from
- debian bookworm: pxlib-dev 0.6.8-1+b1
- debian trixie: pxlib-dev 0.6.9-1+b1
- ubuntu jammy: pxlib-dev 0.6.8-1
- ubuntu noble: pxlib-dev 0.6.8-1
- ubuntu questing: pxlib-dev 0.6.9-1
- ubuntu resolute: pxlib-dev 0.6.9-1build1
- ubuntu stonking: pxlib-dev 0.6.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms