PX_PUT_DATA_LONG(3)
π PX_PUT_DATA_LONG π
okay so bestie, welcome to the PX_put_data_long(3) page from the Library Functions Manual β yes she's a library function, yes she's serving, and yes she is literally the only correct way to stuff a long value into a record. let's get into it π«Ά
β¨ NAME β¨
PX_put_data_long β put a value into a long data field π
like. that's the whole job. putting a value. into a long field. iconic behavior honestly.
πΈ SYNOPSIS πΈ
#include <paradox.h>
void PX_put_data_long(pxdoc_t *pxdoc, char *data, int len, int value)
look at her. four args, returns nothing, zero drama. void girlies rise π
π¦ DESCRIPTION π¦
so what's actually happening here? PX_put_data_long converts an integer into a value for a data field as it is stored in the database file. that's the whole vibe β you hand it an int, it hands the database the exact bytes the database wants. matchmaker energy fr fr π
bestie listen. 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 move. that is never the move. π
now, about data β she points to the start of the data field in the record. but here's the part where you have to actually do math (i know, i know, stay with me π):
to get that pointer, you sum up all field length before the field to operate on, and then add it to the base pointer of the record.
so like:
data = base_pointer_of_record + (sum of all field lengths before this field)
and then you pass that data in. that's it. that's the whole ritual. do the sum, add it to the base pointer, hand over the pointer, let the function cook. no cap. π₯
π SEE ALSO π
her sisters!! the whole put-data family, all in their own manual pages:
PX_put_data_short(3)PX_put_data_double(3)PX_put_data_alpha(3)PX_put_data_byte(3)PX_put_data_bytes(3)
collect the whole set, they're all giving π
π AUTHOR π
this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service, we are obsessed π«Άβ¨
and that's the page!! Library Functions Manual, PX_PUT_DATA_LONG(3), no date on this one so don't come for me β she's undated and unbothered, main character energy only ππΈ
π¦ 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