Kaushal Modi <kaushal.m...@gmail.com> writes:

> I was writing something along the lines of this when I needed to specify
> the n macro to hold its previous value and not increment at all.

[...]

> I haven't yet created a proper formatted patch, because I don't know if
> this is the best implementation. Would it be better to rename the RESET
> option to something more generic, like ARG? That way,
>
> - If ARG is a "-" string, the counter value will be held and not
> incremented.
> - If ARG is a number represented as a string, it set the NAME counter to
> that value (like now).
> - Else if ARG is a non-empty string, it resets the NAME counter to 1 (like
> now).

I think it is better since resetting, setting and holding are mutually
exclusive. With tests, please! :)

Regards,

Reply via email to