Polysemous Values Qustion
Janice Caron
caron800 at googlemail.com
Tue Sep 25 00:51:18 PDT 2007
In another thread, Christopher Wright said that polysemous meant "A
variable that can have several types depending on how it is assigned
or casted is polysemous. Walter wants to use this especially for
string literals -- should it be fixed length or not, should it be
char, wchar,
dchar?"
And then Don Clugston said "For example, the literal number 1. Could
be a short, int, uint, float, complex number,..."
Both of those examples are LITERALS. I get that. Literal can be
interpreted as either one type or another. It makes sense that you'd
want to delay nailing down the decision until you really have to.
But CW said: "A /variable/..." (my emphasis). Can you have a
polysemous variable (as opposed to literal)? I don't get how that
would work.
More information about the Digitalmars-d
mailing list