comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: String formatting a-la fprint()
Date: Wed, 22 Nov 2017 17:08:45 +0200
Date: 2017-11-22T17:08:45+02:00	[thread overview]
Message-ID: <ov43tt$1b13$1@gioia.aioe.org> (raw)

Despite voices against, I decided to use gettext in my Ada program.

I could form a string as a concatenation:

"Wrong number of predicates <" & URL & "> in node " & URL2 & "."

but this cannot be used with gettext.

I need instead single string like

"Wrong number of predicates <%s> in node %s."

as in C.

The syntax may be different than in C, for example:

"Wrong number of predicates <{arg1}> in node {arg2}."

Which Ada (2012) library would you suggest for such short string templates?

-- 
Victor Porton - http://portonvictor.org


             reply	other threads:[~2017-11-22 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 15:08 Victor Porton [this message]
2017-11-22 21:20 ` String formatting a-la fprint() Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox