Balderstrom wrote:and the post-procesing by TC would be a single line function applied to the counter
Ah, now I see. Not quite true if you allow nesting I guess.
Anyways, quite the same point applies to arbitrary base: since there's base-26 there must be some code already to convert numbers (represented as bit strings) from and to that system. For example, converting
to:
Code: Select all
do {
out = digits[n % base] + out; // prepend new digit
n /= base;
} while (n > 0);
Almost trivial, and it's just a matter of letting the user set a value for `base`in some way or another.
Balderstrom wrote:[...] something like "[C] % 100"
[...]
EDIT:
It wouldn't even need to be a checkbox, one could do this in the FileName box: [C % 100]__[N]
"[C] % 100" wouldn't work because it already has a (different) meaning, it needs to be something like "[C % 100]". That's what I mean by syntax: what goes into the FileName box.
Checkbox, dialog, dropdown... is what I mean by GUI. Any extension needs to be in both.
As I said, defining a modulus is no different from defining a base, so there's no difference wrt GUI: just another field where you enter a number (in decimal there).
Regarding which digits to use: you're right, that can be done with search/replace. So it'd probably be better not to put it into the counter.
Note that you cannot do base conversion with search/replace, even with regular expressions.
What you can do with it, however, is cut off leading digits, which corresponds to taking the remainder for a fixed modulus (=base).
So that means MOD (without nesting) + regex search/replace is strictly less powerful than arbitrary base + regex search/replace.
The example I gave in the OP is just one. What if I actually want my files numbered in hex, without "restart"? With MOD I can't.