This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 11067

No matter what format I use, someone won't like it, so how about this:

I'll add a new "set" option, "set enum-fmt" or something like that that can take a printf-style format string. Default format if the string isn't set is current behaviour, otherwise the string is parsed, looking for %-directives, %v for the numeric value of the enum, %s for the symbolic value, and %e for the enum decl. My spaceless format, e.g., would be set with a format of

set enum-fmt "%s=(enum %e)%d"

If Roland wants spaces, he can use

set enum-fmt "%s = (enum %e) %d"

or whatever.

I've never been a big fan of breaking historical behaviour, and this avoids that. It's a bigger patch, but I think it's a better one.


On 02/05/10 15:18, Roland McGrath wrote:
Based on what people were saying yesterday, I thought I'd go with

$1 = Val1=(enum E)56

It looks like a legitimate C expression. Lacking spaces, it's cohesive,
and it's easily understood to present the same information in multiple

Please don't skimp on the spaces.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]