Making an exception in calt?

I can now make code like this:

sub @A @Xby @A_ALT;

Now I want to code to make it do that but only when not preceded by @A. I tried finding how in the manual and tutorials and forum but can’t find it. Something like:

sub [everything except for @A] @A@X by @A_ALT;

How would I code that properly?

I then need a little more complicated, something like this is you know what I mean:

sub [everything except for: @A or (@A @B) or (@A @C)] @A@X by @A_ALT;

What I mean by " [everything except for: @A or (@A @B) or (@A @C)] " is, except when preceded by @A; or by @A then @B, or by @A then @C.

Many thanks!

Maybe an ignore statement will help

1 Like

Thanks, I’ve just read that now. I’m not sure how to put that into this example though. Something like this?

sub ignore [@A (@A @B) (@A @C)] @A@X by @A_ALT;

What I worry about is that:

  1. I made up the () thing, I expect it’s not the real code I want!
  2. What does the ignore act on? The one item after it? Which would in this case be all that’s in the brackets? Or…?

I want it to do the @A@X by @A_ALT unless it’s preceded by any of these 3:
@A @B
@A @C

Consider diving deeper into the resource @jakob_runge linked to, e.g., on

Also, see the Features tutorials on this webpage. The one about Positional Alternates discusses the ignore statement in depth.

And the mothership of course:

1 Like