PX_GET_FIELD(3)

πŸ’– PX_GET_FIELD(3) πŸ’–

okay bestie, buckle up, because this one lives in the Library Functions Manual and it is literally the little key that unlocks one single field inside a Paradox file. one field. that's the whole job. and she does it flawlessly. πŸ’…


✨ NAME ✨

PX_get_field β€” returns a single field definition from a Paradox file πŸŽ€


✨ SYNOPSIS ✨

#include <paradox.h>

pxfield_t *PX_get_field(pxdoc_t *pxdoc, int fieldno)

✨ DESCRIPTION ✨

So basically: you hand her a Paradox file, you tell her which field number you want, and she hands you back the meta data for that field. that's it, that's the vibe. 🌸

heads up tho β€” the numbering is zero-indexed, as is tradition:

  • the first field is number 0
  • the last field is number number_of_fields-1

and the thing she gives you back is a pxfield_t, which is defined exactly like this, no cap:

typedef struct px_field pxfield_t;
struct px_field {
char *px_fname;
char px_ftype;
int px_flen;
int px_fdc;
};

now the fun part. px_ftype is the field's type, and here's the full rundown of what each value means β€” i am not skipping a single one, bestie, we're doing the whole list πŸ‘‘

  • pxfAlpha β€” character string with a maximum of px_flen charackters.
  • pxfDate
  • pxfShort β€” short integer (16 Bit)
  • pxfLong β€” long integer (32 Bit)
  • pxfCurrency
  • pxfNumber
  • pxfLogical
  • pxfMemoBLOb
  • pxfBLOb
  • pxfFmtMemoBLOb
  • pxfOLE
  • pxfGraphic
  • pxfTime
  • pxfTimestamp
  • pxfAutoInc
  • pxfBCD
  • pxfBytes β€” array of bytes.

and that's the entire menu. every single one accounted for. ate. πŸ”₯


✨ RETURN VALUE ✨

  • on success: a pointer to the field 🫢
  • on failure: NULL 😭

that's it. that's the whole contract.


✨ SEE ALSO ✨

go read those too, they're iconic in their own right πŸ’œ


✨ AUTHOR ✨

this manual page was written by Uwe Steinmann uwe@steinmann.cx. ty for your service, king πŸ‘‘


and that's the whole page, bestie!! this little diva is part of PX_GET_FIELD(3), and if you ever forget her name just yell PX_GET_FIELD(3) into the void and she'll come running. mwah πŸ’‹βœ¨πŸ¦‹