RKLEFT(3)

πŸ’– RKLEFT(3) πŸ’–

ok so bestie, welcome to the Library Functions Manual ✨ this one is filed under RKLEFT(3), and it's a tiny lil cutie from the Canna corner of the world. buckle up, it's like four facts long and we're gonna make them iconic πŸŽ€


🌸 NAME 🌸

RkLeft β€” move the current clause to the clause to its left 🫢

like, literally just that. cursor goes left, clause goes with it, no cap.


✨ SYNOPSIS ✨

#include <canna/RK.h>
int RkLeft(cxnum)
int cxnum;

so you pull in <canna/RK.h> first, then you hit it with RkLeft(cxnum) and hand it a cxnum. that's the whole vibe check πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's what RkLeft does: it moves the current clause to the clause sitting to its left. simple. elegant. main character energy πŸ‘‘

but wait, there's a lil plot twist πŸŒ€ β€” if the current clause is 0, it doesn't just sit there being sad, no. it wraps all the way around and moves to the last clause instead. so clause zero is giving "end of the line? nope, I'm going to the back of the bus" 🚌✨


πŸ’€ RETURN VALUE πŸ’€

  • if it succeeds, it moves the current clause in the context and then returns the current clause number after the move. so you get the new position handed right back to you, obsessed πŸ’–
  • it returns 0, without doing anything at all, if it's been run in a nonconversion mode context. like, nothing happens. zero. zilch. not a single clause was moved. 😭
fr fr, if you're in nonconversion mode, don't expect movement. it will literally return 0 and ghost you πŸ™ˆ

that's the whole page bestie, short and sweet, no filler, we ate πŸ“

this one comes straight from the Library Functions Manual, filed under RKLEFT(3) β€” go forth and shift those clauses, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from