SNOBOL4BLOCKS(1)

πŸ“¦
version 2.3.1 Β· 3 versions
, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– SNOBOL4BLOCKS πŸ’–

okay bestie, buckle up, this is the snobol4blocks page from the CSNOBOL4 Manual and it's literally about making strings exist in 3D πŸ¦‹


✨ NAME ✨

snobol4blocks β€” the SNOBOL4 BLOCKS extension πŸŽ€


🌸 DESCRIPTION 🌸

The BLOCKS extension was developed by Jim Gimpel while he was at Bell Labs. A BLOCK is a data type that extends string concatenation to three dimensions πŸ’… like bestie, strings but they're architecture now.

Enabling the BLOCKS extension with the -BLOCKS control line (peep snobol4ctrl(1)) or the -B command line option (peep snobol4cmd(1)) alters the definition and precedence of the percent and pound operators (peep snobol4op(1)). so yeah, those two little guys change meaning, no cap 😭

Here's the vibe:

  • White space concatenates two BLOCKs in the horizontal dimension
  • the percent sign (%) concatenates two BLOCKs in the vertical dimension
  • and the pound sign (#) concatenates two BLOCKs in the dimension β€œnormal” to the paper (over-strike) 🫢

The functions defined below are always present when CSNOBOL4 has been built with blocks enabled. periodt πŸ’–

🧚 Functions 🧚

For dir arguments: 0=β€œvertical”, 1=β€œhorizontal”, 2=β€œnormal” β€” memorize this, it comes back like seventeen times 😭
  • BCHAR(b) β€” Returns character representation of BLOCK b as an ARRAY of strings, dimensioned d x h, where d is the depth of the block and h is the height of the block (renamed from CHAR). it's giving glow-up ✨
  • BOX(h,w,d) β€” Returns a BLOCK of fill characters of height h, width w and depth d. the classic box, iconic πŸ’…
  • BLOCKSIZE(b,dir) β€” Return INTEGER size of block b in direction dir. numbers bestie πŸ”’
  • CC(unit) β€” Accessor function to change carriage control on I/O unit unit.
    • If value is positive, ASA (FORTRAN style) carriage control is output in column one (the asa2pdf program converts ASA format to PDF πŸŽ€).
    • If value is zero, no carriage control is output.
    • If value is negative, ASCII carriage control characters are output (CSNOBOL4 extension).
  • DEF(b) β€” Returns a BLOCK whose organization is deferred. it's keeping its options open πŸ™ˆ
  • DEPTH(b) β€” Returns INTEGER depth of BLOCK b. πŸ“
  • DUP(b,dir,n) β€” Duplicate BLOCK b n times in direction dir. copy paste slay πŸ‘‘
  • EJECT([i,...]) β€” Eject a page and return the null string. Optional unit numbers may be given to β€œbroadcast” the form feed. πŸ“„βœ¨
  • FIX(b) β€” Returns a block whose organization is physical β€” all positioning is done at this time, and no information on how the block was formed is retained. it forgot its whole origin story πŸ’€
  • FRONT(h,w) β€” A special case of BOX(). Returns a BLOCK of fill characters of height h and width w and of depth zero. flat bestie 🫢
  • HEIGHT(b) β€” Returns INTEGER height of BLOCK b. πŸ“
  • HOR(n) β€” A special case of BOX(). Returns a block of fill characters whose width in n and height and depth zero.
  • HOR_REG(b) β€” Accessor which returns or sets the horizontal registration of BLOCK b. Values: 'RIGHT', 'RIGHT', ´´ (centered). yes it says 'RIGHT' twice, that's canon, don't @ me 😭
  • IT(b) β€” Returns a block whose organization is iterated orthogonally to parent. πŸ”
  • LOC(n,b,dir) β€” Returns the location of NODE n in BLOCK b in direction dir. πŸ“
  • LRECL(unit) β€” Undocumented!! Accessor for I/O unit record length??? 🫣 like girl even the manpage is confused
  • MERGE(b1,b2,....) β€” Returns a BLOCK whose organization is merged. πŸ«‚
  • NODE(b) β€” Returns a BLOCK whose organization is deferred.
  • NORM_REG(b) β€” Accessor which returns or sets the normal plane registration of BLOCK b. Values: 'FRONT', 'REAR', ´´ (centered).
  • OVY(b1,b2) β€” β€œOverlay” β€” concatenation in the β€œnormal” plane.
  • PRINT(b,[i1,....]) β€” Prints block to I/O unit 5. Additional unit numbers may be given to β€œbroadcast” BLOCK b. πŸ“’
  • REP(b) β€” Returns a BLOCK whose organization is replicated. ✨
  • SER(b1,b2) β€” β€œSerial?” β€” concatenation in the vertical plane. the question mark is doing a lot of heavy lifting here bestie πŸ™ˆ
  • SLAB(b,dir,offset,length) β€” Returns a physical block which is a cross-sectional cut of b, in direction dir. cross section like a lil science diagram 🧚
  • VER(n) β€” A special case of BOX(). Returns a BLOCK of fill characters whose height is n.
  • VER_REG(b) β€” Accessor which returns or sets the vertical registration of BLOCK b. Values: 'TOP', 'BOTTOM', ´´ (centered).
  • WIDTH(b) β€” Returns INTEGER width of BLOCK b. πŸ“

πŸ’œ Keywords πŸ’œ

  • &FILL β€” The fill character (defaults to space). default is a space, cute, minimalist, we love her πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page bestie πŸ’– CSNOBOL4B 2.3.1, dated March 31, 2022 β€” go forth and build ur lil 3D string sculptures, u absolute main character πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from