GETABLEXPRNUM(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

πŸ’– GETABLEXPRNUM β€” the abl functions, part 3, bestie edition πŸ’–

okay so real talk, this is a page from the ABL FUNCTIONS section of the manual (section 3, iykyk β€” that's library calls, we're fancy like that). And what it does? It hands you a specified operand of an expression. That's it. That's the whole vibe. Let me put you on. ✨


🌸 NAME 🌸

getablexprnum β€” gives a specified operand of an expression.

like... it literally says it in the name. get β†’ able β†’ expr β†’ num. she's not hiding anything. πŸ’…


πŸŽ€ ORIGIN πŸŽ€

This software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. πŸ‡«πŸ‡·βœ¨

ngl that's a whole institution behind this little function. iconic behavior.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "abl101.h"
chain_list βˆ—getablexprnum( Expr, Number )
  chain_list βˆ—Expr;
  int        Number;

so you pull in abl101.h, you call getablexprnum, you pass it two things, and it gives you back a chain_list βˆ—. that's the whole deal. 🫢


πŸ’œ PARAMETERS πŸ’œ

  • Expr β€” Expression. yes bestie, the expression. the thing you're picking apart.
  • Number β€” Operand number. which operand you want. it's an int. that's the number. πŸ“

✨ DESCRIPTION ✨

getablexprnum gives the operand Number of Expr.

that's the entire plot. no twist, no subplot, no cliffhanger. you say "give me operand number N of this expression" and it does. main character energy, zero drama. πŸ‘‘


🌈 RETURN VALUE 🌈

getablexprnum returns the operand Number of Expr.

yep. the return value is the thing. the function returns the operand. this manpage really said "let me say it three times so you don't miss it" and honestly? respect. 😭


πŸ”₯ EXAMPLE πŸ”₯

#include "abl101.h"
  chain_list βˆ—Expr;
  Expr = createablbinexpr( ABL_AND,
                           createablatom( "a" ),
                           createablatom( "b" ) );
  /* displays    b */
  viewablexpr( getablexprnum( Expr, 1 ), ABL_VIEW_VHDL );

okay so walk with me: you build a binary expression β€” an ABL_AND of createablatom( "a" ) and createablatom( "b" ) β€” so like, a AND b. then you ask for operand 1... and boom, you get b, and viewablexpr displays it in ABL_VIEW_VHDL. so Number is zero-indexed basically β€” 0 would be a, 1 is b. that comment in the code says /* displays b */ and it is NOT lying to you. 🧚


⭐ SEE ALSO ⭐

go read that one too, bestie, it's the whole family. πŸŽ€


πŸ’€ BUG REPORT πŸ’€

This tool is under development at the ASIM department of the LIP6 laboratory.

We need your feedback to improve documentation and tools.

not me asking you to actually send feedback. fr fr, if something's weird or wrong, tell them. they're literally asking. πŸ™ˆ

and that's the page, angel πŸ’– that was getablexprnum from the ABL FUNCTIONS section, brought to you by ASIM/LIP6, dated October 1, 1997 β€” yeah, she's vintage, she's a classic, she's still serving. slay. πŸ’…βœ¨