SUBSTDUPABLEXPR(3)

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

✨ NAME ✨

okay so you're reading the SUBSTDUPABLEXPR(3) page, which lives in the ABL FUNCTIONS manual, and it's literally about one thing:

substdupablexpr β€” substitutes a given atom by an expression. πŸŽ€

That's it. That's the whole job. It's giving very focused, very main-character. πŸ’…


🌸 ORIGIN 🌸

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

like, they built a whole CAD system and we're out here substituting atoms. iconic behavior fr fr. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "abl101.h"
chain_list βˆ—substdupablexpr( Expr1, Name, Expr2 )
  chain_list βˆ—Expr1;
  char       βˆ—Name;
  chain_list βˆ—Expr2;

no cap, that's the whole signature. three args, one #include, zero drama. 🌈


πŸ’œ PARAMETERS πŸ’œ

  • Expr1 β€” First expression. (the one you're about to poke at πŸ‘€)
  • Name β€” Atom name. (the atom getting swapped out, by name)
  • Expr β€” Second expression. (yes, the page literally writes Expr here even though the synopsis calls it Expr2 β€” we don't make the rules, we just document them πŸ™ˆ)

πŸ’– DESCRIPTION πŸ’–

substdupablexpr duplicates and substitutes Atom in Expr1 by Expr2.

the way that it duplicates AND substitutes? obsessed. 🫢 so you get a fresh new expression out of it and your original Expr1 stays unbothered. two things at once, she's multitasking, she's thriving. ✨


⭐ RETURN VALUE ⭐

substdupablexpr returns the duplicated and modified expression.

that's your new baby. the original stays the original, the return value is the glow-up version. πŸ’…


πŸ”₯ EXAMPLE πŸ”₯

#include "abl101.h"
  chain_list βˆ—Expr1;
  chain_list βˆ—Expr2;
  chain_list βˆ—Expr3;
  Expr1 = createablbinexpr( ABL_OR,
                            createablatom( "a" ),
                            createablatom( "b" ) );
  Expr2 = createablbinexpr( ABL_AND,
                            createablatom( "c" ),
                            createablatom( "d" ) );
  Expr3 = substdupablexpr( Expr1, "a", Expr2 );
  /* displays ((c and d) or b) */
  viewablexpr( Expr1, ABL_VIEW_VHDL );

okay so like β€” Expr1 is a or b, Expr2 is c and d, and then we yeet "a" out of Expr1 and drop Expr2 in its place. boom: ((c and d) or b). 🧚✨

and then it calls viewablexpr( Expr1, ABL_VIEW_VHDL ) β€” that's the line in the example, we're reporting it exactly as written, no notes, no commentary, just showing you the receipt. πŸ“œ


🌈 SEE ALSO 🌈

iykyk. go read those next, bestie, they're the sibling pages. πŸ‘―


πŸ’€ BUG REPORT πŸ’€

This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools.

fr fr, they're literally asking. if something's weird or the docs are confusing, tell them β€” that's how this gets better. don't be shy. 🫢

and that's the whole page, bestie!! πŸ’– this one came from ASIM/LIP6, dated October 1, 1997, and it's the SUBSTDUPABLEXPR(3) page from the ABL FUNCTIONS manual β€” go substitute something, you've got this. periodt. πŸ’…βœ¨πŸŽ€