form_variables(3FORM)

πŸ’– form_variables β€” the form library's glowy little global besties πŸ’–

okay so this is form_variables(3FORM), a Library calls page, and it's literally just the iconic lineup of global variables that the form library hands you. no cap, they're the moment. ✨


🌸 NAME 🌸

TYPE_ALNUM, TYPE_ALPHA, TYPE_ENUM, TYPE_INTEGER, TYPE_IPV4, TYPE_NUMERIC, TYPE_REGEXP β€” the form system's global variables, aka the field-type girlies πŸŽ€


✨ SYNOPSIS ✨

#include <form.h>

FIELDTYPE * TYPE_ALNUM;
FIELDTYPE * TYPE_ALPHA;
FIELDTYPE * TYPE_ENUM;
FIELDTYPE * TYPE_INTEGER;
FIELDTYPE * TYPE_IPV4;
FIELDTYPE * TYPE_NUMERIC;
FIELDTYPE * TYPE_REGEXP;

πŸ¦‹ DESCRIPTION πŸ¦‹

so these are the building blocks of the form library, bestie. they define the fields you can create with the fieldtype(3FORM) functions. each one comes with its own little set of functions for validating fields and validating characters, all according to whatever datatype it's repping. it's giving very much "pick your fighter." πŸ’…

🌈 TYPE_ALNUM

holds alphanumeric data. letters AND numbers, she contains multitudes. πŸ”₯

🌈 TYPE_ALPHA

holds alphabetic data. just letters, no digits invited to this party. 🌸

🌈 TYPE_ENUM

holds an enumerated type. pick from the list, periodt. πŸ‘‘

🌈 TYPE_INTEGER

holds a decimal integer. whole numbers only, no decimals sneaking in. ⭐

🌈 TYPE_IPV4

holds an IPv4 internet address, e.g., "127.0.0.1". yes, localhost is that girl. πŸ πŸ’œ

🌈 TYPE_NUMERIC

holds a decimal number, with an optional sign and an optional decimal point. flexible queen. πŸŽ€

🌈 TYPE_REGEXP

holds a regular expression. regex girlies rise, iykyk 😭


🫢 PORTABILITY 🫢

lowkey important: the TYPE_IPV4 variable is an extension that the older implementations of the form library did NOT provide. so if you're out here on some ancient build, don't be surprised when she doesn't show up. πŸ’€


πŸ‘€ SEE ALSO πŸ‘€

  • form(3FORM)

and that's the whole vibe check, bestie β€” go forth and validate those fields πŸ’–βœ¨

this was brought to you by ncurses 6.6, dated 2024-03-16, and honestly? she ate. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from