Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > getting around lack of bool type support

Reply
Thread Tools

getting around lack of bool type support

 
 
Golden California Girls
Guest
Posts: n/a
 
      01-02-2008
Army1987 wrote:
> Golden California Girls wrote:
>
>> Army1987 wrote:
>>> Golden California Girls wrote:
>>>
>>>> Army1987 wrote:
>>>>> Malcolm McLean wrote:
>>>>>>> #define TRUE -1 is also very neat.
>>>>> Why did you precede that line by >? it was not in the post you were
>>>> Your newsreader must have missed a message
>>> Even if it has, someone used a wrong number of > signs.
>>> The lines " #define TRUE 1 #define YES 1" and "#define TRUE -1 is ..."
>>> appear to be both by user923005, whose message I have, but the latter line
>>> doesn't appear there.

>> It appears as if Malcolm started his response with a ">" character. Likely was
>> on the wrong line when he typed it. My newsreader does have a blank line
>> between his response and the quoted material above.

>
> And what I asked to Malcom was exactly why did he add a > at the beginning
> of the line.
>


My threading says you asked Keith, but not the quoting.

Not important.
 
Reply With Quote
 
 
 
 
SM Ryan
Guest
Posts: n/a
 
      01-02-2008
Here's a clue for you.

Open a browser window to http://groups.google.com/
Click advanced search
Enter http://www.velocityreviews.com/forums/(E-Mail Removed)
as the message-id box.
Click Look Up Message.
Click on the subject line link.

Google will show you a tree of who followed whom. When. Where.
God knows why.

Click on a user name on the left and the message will appear
on the right.

Computers are marvelous. They can do all kinds of neat things
for you so you don't have to fight over 'he snipped my name'
'did not' 'did so' 'did not' with all the wit and wisdom
normally seen in a kindergarten playground.

You know with some advanced programming techniques you can
probably write a little tool that can do all the google
transactions, cookies, etc, so you can have an application
you drop a message id on, and it shows you the discussion
in google for you.


Golden California Girls <(E-Mail Removed)> wrote:
# Army1987 wrote:
# > Golden California Girls wrote:
# >
# >> Army1987 wrote:
# >>> Golden California Girls wrote:
# >>>
# >>>> Army1987 wrote:
# >>>>> Malcolm McLean wrote:
# >>>>>>> #define TRUE -1 is also very neat.
# >>>>> Why did you precede that line by >? it was not in the post you were
# >>>> Your newsreader must have missed a message
# >>> Even if it has, someone used a wrong number of > signs.
# >>> The lines " #define TRUE 1 #define YES 1" and "#define TRUE -1 is ..."
# >>> appear to be both by user923005, whose message I have, but the latter line
# >>> doesn't appear there.
# >> It appears as if Malcolm started his response with a ">" character. Likely was
# >> on the wrong line when he typed it. My newsreader does have a blank line
# >> between his response and the quoted material above.
# >
# > And what I asked to Malcom was exactly why did he add a > at the beginning
# > of the line.
# >
#
# My threading says you asked Keith, but not the quoting.
#
# Not important.
#
#

--
SM Ryan http://www.rawbw.com/~wyrmwif/
The whole world's against us.
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      01-02-2008
In article <(E-Mail Removed)>,
SM Ryan <(E-Mail Removed)> wrote:
>Here's a clue for you.


>Open a browser window to http://groups.google.com/
>Click advanced search
>Enter (E-Mail Removed)
>as the message-id box.
>Click Look Up Message.
>Click on the subject line link.


>Google will show you a tree of who followed whom. When. Where.


No it won't. Google will show me a message saying that there
are too many topics that have been marked as being first, and that
I have to unmark one of the topics before I can read the messages.
No tree will be shown to me. No help is provided as to how to
unmark one of the supposedly too-many marked topics (I never marked
any topics either...)

I even went so far as to create a google groups account today, thinking
that maybe this was an issue that could be worked around by
signing in and finding some way from there to clear the marked topic
list for -me-. It took a few tries before google would actually
create the account for me, but it turned out not to make any difference.
Google is stil futzed up when I try.
--
We regret to announce that sub-millibarn resolution bio-hyperdimensional
plasmatic space polyimaging has been delayed until the release
of Windows Vista SP2.
 
Reply With Quote
 
Army1987
Guest
Posts: n/a
 
      01-02-2008
Golden California Girls wrote:

> My threading says you asked Keith, but not the quoting.
>
> Not important.

It is your threading which is broken. My post read exactly:

[BEGIN QUOTE]
Malcolm McLean wrote:

> "user923005" <(E-Mail Removed)> wrote in message
>
>> #define TRUE 1 #define YES 1
>> #define FALSE 0 #define NO 0

>
>> #define TRUE -1 is also very neat.

Why did you precede that line by >? it was not in the post you were
replying to. Btw, I'd add parentheses, just to avoid... er... TRUE[ptr]
do the wrong thing.

> A single set bit is -1 in two's complement notation, but the real advantage
> is now we can say
> ~TRUE == FALSE.

I fail to see why that's an advantage.
--
Army1987 (Replace "NOSPAM" with "email")
[END QUOTE]

and was in response to Malcolm's post

--
Army1987 (Replace "NOSPAM" with "email")
 
Reply With Quote
 
Golden California Girls
Guest
Posts: n/a
 
      01-03-2008
Army1987 wrote:
> Golden California Girls wrote:
>
>> My threading says you asked Keith, but not the quoting.
>>
>> Not important.

> It is your threading which is broken. My post read exactly:
>


Checking the references in the headers, it does appear that Thunderbird version
2.0.0.9 (20071031) did not thread it correctly on screen. It is indented under
Keith's Message-ID: <(E-Mail Removed)>
Army's References:
<(E-Mail Removed)>
<(E-Mail Removed)>
<fl48h5$mlt$(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>

Well, so long as the bug doesn't bite too often.
 
Reply With Quote
 
pete
Guest
Posts: n/a
 
      01-03-2008
Ivan Novick wrote:
>
> On Dec 28, 5:39 pm, Chris McDonald <(E-Mail Removed)> wrote:
> > Ivan Novick <(E-Mail Removed)> writes:
> > >If you are trying to get existing code to compile
> > >and don't have bool
> > >on your system try typedefing it.
> > >typedef short bool
> > >#define true 1
> > >#define false 0

> >
> > (Serious question) why have you chosen
> > to use a short (not a char, not an int)?


> I agree, it should be char.


I would have chosen int.
The use of lower ranking types than int,
tends to cause implicit conversions.
The meaning of the code is simpler
when it has fewer implicit conversions,
and that's the way I like it.

It's possible and perhaps even likely,
that your C implementation,
may choose to line up small types on int address boudaries anyway,
in which case, the space saved, may not be usable.

It's also possible that your C implementation
may use masking operations
to implement arithmetic operations on small types,
in which case the resulting executable code
is both larger and slower than it would be
using an int type for bool instead.

--
pete
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
enum promote to bool type rather than Integer type? FE C++ 6 08-04-2009 03:21 PM
Name-brand DVD decks lack support RichA DVD Video 1 07-20-2005 02:05 PM
Lack of Support Stephen Boursy Firefox 4 03-11-2005 04:37 PM
Spam and ISP lack of support Silverback Computer Support 11 02-06-2005 10:21 PM
Working around a lack of 'goto' in python Brett Python 13 03-07-2004 08:49 PM



Advertisments