Return ASCII value as uint

okibi okibi at ratedo.com
Tue May 8 11:30:06 PDT 2007


Jari-Matti Mäkelä Wrote:

> okibi wrote:
> > John Ohno Wrote:
> >> uint toUint!(T)(T c) {
> >>         return (cast(uint)c);
> >> }
> > 
> > Well, that doesn't compile. Is the ! needed? Anyways, if I pass an "s" to
> > that, it should return the ASCII value (115 I think), right?
> 
> That ! is a typo.

I thought it was, works great without it!

Thanks,
Okibi


More information about the Digitalmars-d-learn mailing list