[stringtemplate-interest] "\n" goes away
Koerner, Ron
ron.koerner at wincor-nixdorf.com
Thu Oct 15 01:32:30 PDT 2009
> On Oct 13, 2009, at 11:21 PM, Zenaan Harkness wrote:
> > On Tue, Oct 13, 2009 at 08:41:47PM -0700, Bill Venners wrote:
> >> Hi Terence,
> >>
> >> How about a newline keyword? Something like:
> >>
> >> <expr; separator=newline>
> >>
> >> Verbose, and an extra keyword, but clear.
> >
> > Hi Bill, how would you then write a separator of 'two
> spaces, followed
> > by a newline, follwed by a single tab character, followed
> by two more
> > spaces'??
>
> Ah. good point. now it would be:
>
> separator={ <\n> }
>
> I guess that's not horrible, but...
>
> Ter
What about both? Allow:
<expr; sep=nl>
for easy/common case, as well as:
<expr; sep={ <\n><\t> }
for the uncommon case, as well as:
mailsep() ::= "$\n$> "
$expr; sep=mailsep$
Actually you could combine first and last case by defining a always accessible template named "nl" which consists just of a newline.
This would not require but benefit greatly by multiple inheritance (mis)used to include general utility template libraries which was discussed in another post.
Regards,
Ron
--
WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193
Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
More information about the stringtemplate-interest
mailing list