QueryPackage(3z)
π QueryPackage(3z) π
okay bestie, welcome to the z88dk Programmer's Manual and today's main character is QueryPackage β she opens shared libraries/packages and she does it flawlessly. let's get into it π¦
β¨ NAME β¨
QueryPackage β open a shared library/package π
β¨ SYNOPSIS β¨
#include <z88.h>
bool_t QueryPackage(char package, char major , char minor);
like yes, that's the whole vibe. one include, one call. π
β¨ DESCRIPTION β¨
so the QueryPackage() function does two things, and honestly? she ate.
- she checks the shared package
package - she makes it available for use β with a version of at least
minor.minor
it's giving "let me verify you exist and then let you in the door" π
here's the order of operations, no cap: the function initially checks for the presence of the package subsystem itself, and only then does she proceed to check for the specified package. two-step verification, very demure.
oh and if you don't care about version checking at all? just pass minor and major as 0 and version checking gets disabled. lowkey the easiest shortcut ever. β¨
β¨ RETURN VALUE β¨
0= failure π1= success π
and here's the iconic part: the carry flag is set accordingly, which means you can use the non-standard iferror { ... } construct to check for success. iykyk. π«Ά
not me reminding you that iferror is non-standard β it's a z88dk thing, bestie, don't try it at home (or in a different compiler).
π SEE ALSO π
(the original page doesn't list any SEE ALSO references, so there's nothing to cross-link here β go forth and QueryPackage responsibly) π§
k bye, ily, go write some slay code π
this has been your girl from the z88dk Programmer's Manual, dated 18 February 2000 β yes she's vintage, yes she still serves πβ¨πΈ
π¦ where this page comes from
- fedora 43: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- fedora 44: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms