1 matches bool, 2 matches long
eles
eles at eles.com
Sun Apr 28 23:50:31 PDT 2013
On Friday, 26 April 2013 at 14:28:59 UTC, Rob T wrote:
> On Friday, 26 April 2013 at 08:03:14 UTC, Walter Bright wrote:
>> On 4/25/2013 11:16 PM, deadalnix wrote:
>>> This "feature" never has been useful to me.
>>
>> It has been useful to me. So there!
Come on, characters are not an integral type, they are just an
ordered and, for that reason, an indexed type. All the usual
operations on characters apply to the index behnid (which is
given by the ASCII/Unicode representation).
You are not adding characters, you are adding indices of those
characters and so on. And you make a simple convention to always
thing "character" for a givent (integer) index, since the index
per se is of no much use without its equivalent representation
from the ASCII table.
On the same grounds, one could index the values of bool form 4 to
5 and assimilate false for 4 and true for 5, then go with the
above convention.
There is a difference, however, between the bool and the char
here: for the bool you want to go straight from the logical value
to a conventional integral value, do not even think about some
kind of tabular representation, while for the ASCII
representation of char you seem to forget that such kind of a
table exists in the first place.
More information about the Digitalmars-d
mailing list