PX_GeT_DATA_DOUBLE(3)

πŸ’– PX_GeT_DATA_DOUBLE πŸ’–

okay so bestie, this is a page from the Library Functions Manual β€” yes the PX_GeT_DATA_DOUBLE(3) one, the lowercase-coded legend herself. sit down, grab a strawberry πŸ“, we're decoding double data fields together.


✨ NAME ✨

PX_get_data_double β€” grab a double data field, no cap


πŸŽ€ SYNOPSIS πŸŽ€

#include <paradox.h>

int PX_get_data_double(pxdoc_t *pxdoc, char *data, int len, double
*value)

🌸 DESCRIPTION 🌸

so what this girlie does is she takes a data field exactly the way it's stored in the database file and converts it into a double for the host architecture. like, translation services but for bytes. πŸ¦‹

and listen β€” you should use this function instead of just reaching into the data yourself with your bare hands. do not touch the raw data directly, bestie, that's not your business, that's her job. πŸ’…

now, data points to the start of the data field inside the record. and here's the part where you have to do math (sorry, i know 😭): you have to calculate that pointer by summing up all field length before the field to operate on and adding that sum to the base pointer of the record. that's the whole recipe. no shortcuts.

Note: ⚠️ this function is deprecated and obsolete if PX_retrieve_record(3) is used. like, if you're already on the PX_retrieve_record(3) train, this one's giving retired. periodt.

🌈 RETURN VALUE 🌈

  • 0 β€” the value is NULL
  • -1 β€” an error happened 😬
  • 1 β€” otherwise, we slayed ✨

πŸ‘‘ SEE ALSO πŸ‘‘

the whole squad, fr fr 🫢


πŸ’œ AUTHOR πŸ’œ

this manual page was written by Uwe Steinmann uwe@steinmann.cx. iconic behavior, honestly.


and that's the tea πŸŽ€ this has been the PX_GeT_DATA_DOUBLE(3) page, living her best life in the Library Functions Manual β€” mwah, go convert something πŸ’–βœ¨