🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7184

Re: convert char to hex

#7184
From: Remy Lebeau (TeamB)
Date: Sun, 27 Feb 2005 05:50
18 lines
1503 bytes
"Kane" <info@ndw.com> wrote in message
news:4220e477$1@newsgroups.borland.com...

> char ch = convert('A'); //returns 0x41

Do you need the value to be returned as a string or as a numeric value?  If
a numeric value, then the compiler already handles that for you
automatically:

    char ch = 'A'; // 'ch' contains a numeric value of 0x41.

You can also do things like the following:

    int i = 'A'; // 'i' contains a numeric value of 0x41, decimal 65


Gambit
Technical Details
Message-ID: <42215f8d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!news.netcologne.de!newsfeed-fusi.netcologne.de!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4220e477$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e4fa8a59011e3e3c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4220e477$1@newsgroups.borland.com>
Subject: Re: convert char to hex
Date: Sat, 26 Feb 2005 21:50:15 -0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <42215f8d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1109483405 68.69.17.41 (26 Feb 2005 21:50:05 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!news.netcologne.de!newsfeed-fusi.netcologne.de!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail