VistaIORepn(3)

πŸ’… VistaIORepn(3) β€” Library Functions Manual ✨

okay bestie, welcome to the VistaIORepn page, aka the group chat where you find out everything about a type's representation. no cap. 🫢


🌸 NAME 🌸

VistaIORepnName, VistaIORepnSize, etc. β€” obtain information about a type's representation

like. it's giving "let me tell you about this type" energy. all of these lil functions are your besties for that. πŸ’–


✨ SYNOPSIS ✨

so here's the whole vibe, verbatim, no edits (iykyk):

typedef enum {
       VistaIOUnknownRepn,
       VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn,
       VistaIOShortRepn, VistaIOLongRepn,
       VistaIOFloatRepn, VistaIODoubleRepn,
       VistaIOAttrListRepn, VistaIOBooleanRepn, VistaIOBundleRepn,
       VistaIOListRepn, VistaIOPointerRepn, VistaIOStringRepn,
       VistaIOEdgesRepn, VistaIOImageRepn
} VistaIORepnKind;

VistaIOBoolean VistaIOIsFloatPtRepn (VistaIORepnKind repn)

VistaIOBoolean VistaIOIsIntegerRepn (VistaIORepnKind repn)

VistaIOStringConst VistaIORepnName (VistaIORepnKind repn)

VistaIODouble VistaIORepnMaxValue (VistaIORepnKind repn)

VistaIODouble VistaIORepnMinValue (VistaIORepnKind repn)

int VistaIORepnPrecision (VistaIORepnKind repn)

size_t VistaIORepnSize (VistaIORepnKind repn)

that VistaIORepnKind enum? iconic. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • repn β€” Specifies the data type about which information is sought. (translation: you tell it which type you're curious about, and it spills the tea β˜•)

πŸ’œ DESCRIPTION πŸ’œ

These macros return information about Vista data types, each of which is identified by one of the VistaIORepnKind series of integer codes. literally a whole little info desk for your types. 🌈

  • VistaIOIsFloatPtRepn returns TRUE if repn is VistaIOFloatRepn or VistaIODoubleRepn. floating point girlies only, sorry not sorry ✨
  • VistaIOIsIntegerRepn returns TRUE if repn is VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, or VistaIOLongRepn. integer squad, assemble 🫢
  • VistaIORepnName returns a string naming the specified type. For example, when repn is VistaIOBitRepn it returns `bit`. so cute, so simple.
  • VistaIORepnMaxValue returns the maximum value that can be represented by the specified type. the ceiling. the limit. the "that's enough" 😭
  • VistaIORepnMinValue returns the minimum (most negative) value that can be represented by the specified type. the floor, and it's negative bestie πŸ’€
  • VistaIORepnPrecision returns the minimum number of bits needed to represent the specified type on any machine. any machine. so portable of it πŸ’…
  • VistaIORepnSize returns the size, in bytes, of the specified type on the present machine. present machine specifically, don't @ me πŸ¦‹

πŸ”₯ SEE ALSO πŸ”₯


⭐ NOTES ⭐

VistaIORepnMaxValue, VistaIORepnMinValue, and VistaIORepnPrecision are undefined (and return 0) if repn isn't VistaIOBitRepn through VistaIODoubleRepn, or VistaIOBooleanRepn. so like, don't do that. it's giving undefined behaviour and not the fun kind πŸ™ˆ

A new value in the VistaIORepnKind series is assigned by VistaIORegisterType when it is called to register a new object type. That new value can be used in a call to any of these macros β€” all return 0 or FALSE except VistaIORepnName, which returns the name of the newly registered type. new type just dropped and it ate πŸ’…βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

  • Art Pope <pope@cs.ubc.ca>
  • Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

and that's the whole page bestie, no crumbs left πŸ“

VistaIO Version 1.2.14 β€” 21 January 1994. yeah it's vintage, it's that girl, and honestly? still serving. mwah πŸ’‹πŸ’–πŸ¦‹πŸŒΈβœ¨