Mnemonics for Ink alternatives

Ink has various ways to mix up a sequence of texts. But unlike in I7, they’re each indicated with a special character at the beginning…and I can never remember which is which.

∅ (that is, no special marking) runs through once and then stops, like Inform’s [stopping]
& runs through over and over, like Inform’s [cycling]
! runs through once and then prints nothing, like Inform’s [first time]
~ shuffles it at the beginning, and then every time it gets to the end, like Inform’s [at random]

Does anyone have good mnemonics to remember these? I have to open Writing With Ink every time I need one of them.

3 Likes

is like a red circle/slash “no continuing” sign, i.e., stopping

& is like a bicycle standing on its rear wheel: cycling

! is like a serif-less numeral 1 over a teeny numeral 0, for “runs through once and then prints nothing”, i.e., first time

~ is like waggling your fingers in the air, as in “I don’t know what’s going to happen”, i.e., at random.

I don’t know if these are good mnemonics, but they are what I came up with off the top of my head. :smiley:

7 Likes

Don’t use the single character version, use the words: stopping, cycle, once, shuffle.

5 Likes

By the way, you can also replace some other operators:

  • ? → has
  • !? → hasnt
  • && → and
  • || → or
  • % → mod

I’ve been using && || % for 20+ years in other languages so I use them but I’m glad has and hasnt exists.

2 Likes

Can I do that in a single-line thing? I know I can use those in multi-line blocks but when I just want to substitute a couple phrases it breaks up my text in unintuitive ways.

Yes the docs only show multiline usage but it works on a single line too.

3 Likes

That’s incredibly useful! Brb, changing all my existing uses of the magic sigils to these nice clear English words.

You can tell I’m an Inform-user because I’m a firm believer in readability over conciseness for these things.

3 Likes