comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Generics and selection based on type
Date: Fri, 12 Jan 2007 21:50:30 GMT
Date: 2007-01-12T21:50:30+00:00	[thread overview]
Message-ID: <FoTph.348034$1i1.37321@attbi_s72> (raw)
In-Reply-To: <eo8coc$kjc$1@cernne03.cern.ch>

Maciej Sobczak wrote:
> 
> I would like to write a generic function that returns the string 
> representation of its parameter, which can be a number or a string.
> 
> Is it possible?

No. You need different generic formal parameters for signed integer, 
modular integer, fixed-point, and floating-point types. See 
PragmARC.Images for an example:

http://pragmada.home.mchsi.com/

-- 
Jeff Carter
"Sir Robin the-not-quite-so-brave-as-Sir-Lancelot,
who had nearly fought the Dragon of Angnor,
who nearly stood up to the vicious Chicken of Bristol,
and who had personally wet himself at the
Battle of Badon Hill."
Monty Python & the Holy Grail
68



  parent reply	other threads:[~2007-01-12 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12 16:24 Generics and selection based on type Maciej Sobczak
2007-01-12 21:43 ` Björn Persson
2007-01-12 21:50 ` Jeffrey R. Carter [this message]
2007-01-13  9:14 ` Dmitry A. Kazakov
replies disabled

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