Matthew Seaman m.sea...@infracaninophile.co.uk wrote:
'32/' is not any sort of syntax I've ever seen before to
indicate hexadecimal.
I suspect it's a typo, intending '32.' My fingers are forever
mixing up slashes and periods, since the keys are adjacent
(on a US/English keyboard, dunno about
if n == 15 and x is the int. i can say
if ((int)x == 15) Or to check if x == 'A' i can cast x to (char)x.
what's the syntax to chec if x is , say, 32/
--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
Journey Toward the Dawn, E-Book:
From owner-freebsd-questi...@freebsd.org Sun Oct 16 16:27:46 2011
Date: Sun, 16 Oct 2011 14:26:31 -0700
From: Gary Kline kl...@thought.org
To: FreeBSD Mailing List freebsd-questions@freebsd.org
Cc:
Subject: need to check for hex in C: how/
if n == 15 and x is the int. i can say
if
On Sun, 16 Oct 2011 14:26:31 -0700, Gary Kline wrote:
if n == 15 and x is the int. i can say
if ((int)x == 15) Or to check if x == 'A' i can cast x to (char)x.
what's the syntax to chec if x is , say, 32/
The integer types are automatically casted, no matter if
you compare (int) or
On 16/10/2011 22:26, Gary Kline wrote:
if n == 15 and x is the int. i can say
if ((int)x == 15) Or to check if x == 'A' i can cast x to (char)x.
what's the syntax to chec if x is , say, 32/
In C code you can write an integer constant in hexadecimal by prefixing
it with 0x -- so 0x32 is
On Sun, Oct 16, 2011 at 11:07:59PM +0100, Matthew Seaman wrote:
Date: Sun, 16 Oct 2011 23:07:59 +0100
From: Matthew Seaman m.sea...@infracaninophile.co.uk
Subject: Re: need to check for hex in C: how/
To: freebsd-questions@freebsd.org
On 16/10/2011 22:26, Gary Kline wrote:
if n == 15 and
On Sun, Oct 16, 2011 at 11:58:03PM +0200, Polytropon wrote:
Date: Sun, 16 Oct 2011 23:58:03 +0200
From: Polytropon free...@edvax.de
Subject: Re: need to check for hex in C: how/
To: Gary Kline kl...@thought.org
Cc: FreeBSD Mailing List freebsd-questions@freebsd.org
X-Mailer: Sylpheed 3.1.1
On Sun, 16 Oct 2011 16:06:54 -0700, Gary Kline wrote:
this will bbe my 'sanity-checck' of sorts. the ck function will
have something like:
if ((char)x == 'a')
{
}
I'm not sure this is required. Many functions that deal with
characters (in this case: letters) do operate on (int) instead
of
Date: Sun, 16 Oct 2011 16:06:54 -0700
From: Gary Kline kl...@thought.org
Subject: Re: need to check for hex in C: how/
this will bbe my 'sanity-checck' of sorts. the ck function will
have something like:
if ((char)x == 'a')
{
}
And, you deserve what happens if you use that kind of