Date: Wed, 13 Dec 2000 14:17:13 -0500 From: Marcel Moolenaar <marcel@cup.hp.com> To: Marius Bendiksen <mbendiks@eunet.no> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Dag-Erling Smorgrav <des@ofug.org>, Hajimu UMEMOTO <ume@mahoroba.org>, arch@FreeBSD.ORG Subject: Re: %a and %A formats Message-ID: <3A37CB39.C2E8AA67@cup.hp.com> References: <Pine.BSF.4.05.10012131515050.37018-100000@login-1.eunet.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Marius Bendiksen wrote: > > vector *v; > v_create(&v, 3 /*initial*/, 0 /*maxgrow*/); > v_append(v, vdesc_ipfw_proto, myproto); > v_append(v, vdesc_ipfw_ip, myfromip); > v_append(v, vdesc_ipfw_ip, mytoip); > say("Deny \1 from \2 to \3", v); > v_destroy(v); Using indexes to refer to the arguments (vectors) has an advantage for i18n. The order of the arguments is related to the language and some translations produce better messages if the order of the arguments isn't fixed. Other than that, I think I prefer a one line printf() over a 7 line say() anytime :-) -- Marcel Moolenaar mail: marcel@cup.hp.com / marcel@FreeBSD.org tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A37CB39.C2E8AA67>