PX_PUT_DATA_SHORT(3)
๐ PX_put_data_short โ putting a value into a short integer data field ๐
okay bestie, welcome to the PX_put_data_short(3) page, straight outta the Library Functions Manual โจ this one's a little function with a big job and honestly? she ate ๐
๐ธ SYNOPSIS ๐ธ
#include <paradox.h>
void PX_put_data_short(pxdoc_t *pxdoc, char *data, int len, short int
value)
like yes, that's the whole signature, no cap ๐ซถ
๐ฆ DESCRIPTION ๐ฆ
so what does she do? PX_put_data_short takes a short integer and converts it into the value format that a data field actually has when it's stored in the database file ๐โจ it's giving "translator energy" and we love her for it.
and here's the thing, bestie โ you should use this function instead of accessing the record data directly. do not go poking at the raw bytes yourself, that's not the vibe ๐ let the function handle it.
now, about that data parameter: it points to the start of the data field in the record ๐ but it's not just handed to you, no ma'am. you have to calculate it yourself, and the way you do that is by summing up all the field lengths before the field you want to operate on, then adding that sum to the base pointer of the record ๐งฎ๐ literally do the math, bestie, that's the whole trick.
ngl, if you get that pointer arithmetic wrong you're writing into the wrong place, so double-check your offsets before you commit to the bit ๐
๐ SEE ALSO ๐
the rest of the squad, fr fr โ go check them out:
PX_put_data_long(3)PX_put_data_double(3)PX_put_data_alpha(3)PX_put_data_byte(3)PX_put_data_bytes(3)
๐ AUTHOR ๐
this manual page was written by Uwe Steinmann uwe@steinmann.cx โ ty for the lore, king ๐๐
and that's the whole page, bestie!! this one came from the Library Functions Manual, filed under PX_PUT_DATA_SHORT(3) ๐ฆ mwah, go forth and write your shorts correctly ๐
โจ
๐ฆ 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