473,848 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

boolean values and the FAQ

The section about boolean values should mention
<stdbool.h> at least. It is still at the C89 stage...
(Section 9)
Nov 14 '05
17 1747

"Steve Summit" <sc*@eskimo.com > a écrit dans le message de
news:cd******** **@eskinews.esk imo.com...
jacob navia wrote:
The section about boolean values should mention
<stdbool.h> at least.


Indeed it should. I'll make a note. Thanks.


Thanks for your work Steve. The other issues I mention in another
post are not very important. If you want I can contribute a lot
of answered questions about Win32 that could replace the MSDOS
part but that is not essential and I leave it at your choice.

jacob
Nov 14 '05 #11
Kevin Bracey <ke**********@t ematic.com> spoke thus:
I think there must be some sort of annual cycle of Mr Pop unpleasantness; I
think I last killfiled him about the same time last year. Maybe he's trying
for the title of c.l.c's most annoying poster?


Personally, I'd much prefer being told that I'm wrong in the Dan Pop
manner than not know it.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #12
jacob navia wrote:
"Dan Pop" <Da*****@cern.c h> a écrit dans le message de
news:cd******** **@sunnews.cern .ch...
In <cd**********@n ews-reader2.wanadoo .fr> "jacob navia"


<ja***@jacob.re mcomp.fr> writes:
The section about boolean values should mention
<stdbool.h > at least. It is still at the C89 stage...


^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
So is the C programming community at large.

So what?

The current standard is C99. Period.

The FAQ should mention the current version of the standard.
I am not advocating dropping all references to C89, but the
current standard should be mentioned.


So there is a later standard. BFD.
What about all those of us who are forced to use compilers
that are built around the C89 standard?
Many of the companies will not uprade their compilers unless
all of the projects require it. Most of my embedded systems
programming has shown that the C89 standard is adequate and
there isn't a _need_ to upgrade.

But what about legacy projects. I got access to a whole lot
of code that uses #define BOOL, #define TRUE, #define FALSE,
and similar. We are not going to change all that old code
to upgrade it to a standard. Simply because customers will
not pay more for their product than they need to. The money
for upgrading code has to come from somewhere.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Nov 14 '05 #13
Steve Summit wrote:
jacob navia wrote:
The section about boolean values should mention
<stdbool.h > at least.


Indeed it should. I'll make a note. Thanks.

E. Robert Tisdale wrote:
The C FAQ is obsolete.


I'm biased, of course, but I think that's a *little* strong.
It needs to be brought up-to-date.


When's the last time you looked at the version posted here?


I consult the C FAQ frequently.
I don't re-read the entire FAQ every time.
I have probably consulted it at least once in the last week or two.

I think Question 9.1

http://www.eskimo.com/~scs/C-faq/q9.1.htm

is most relevant here.

What is the right type to use for Boolean values in C?
Why isn't it a standard type?
Should I use #defines or enums for the true and false values?

C does not provide a standard Boolean type,

This is no longer true.

in part because picking one involves a space/time tradeoff
which can best be decided by the programmer.

This isn't a valid reason for not defining a standard boolean type.

I seem to recall that I recently consulted Question 6.16

http://www.eskimo.com/~scs/C-faq/q6.16.html

How can I dynamically allocate a multidimensiona l array?

Which does not mention variable dimension arrays --
the safest and simplest solution for new users.

I can't find any FAQ about the restrict keyword.

Question 11.1

http://www.eskimo.com/~scs/C-faq/q11.1.html

What is the ``ANSI C Standard?''

In addition,
both ANSI and ISO require periodic review of their standards.
This process is beginning in 1995,
and will likely result in a completely revised standard
(nicknamed ``C9X'' on the assumption of completion by 1999).

This information is now almost a decade old.
There is a new standard and the C FAQ should be completely overhauled
to reflect the adoption of that new standard.
Nov 14 '05 #14
Christopher Benson-Manica wrote:

Kevin Bracey <ke**********@t ematic.com> spoke thus:
I think there must be some sort of annual cycle of Mr Pop unpleasantness; I
think I last killfiled him about the same time last year. Maybe he's trying
for the title of c.l.c's most annoying poster?


Personally, I'd much prefer being told that I'm wrong in the Dan Pop
manner than not know it.

But then again, I'd rather be told I'm wrong in the Chris Torek manner
than the Dan Pop manner.

Brian Rodenborn
Nov 14 '05 #15
"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > writes:
[...]
There is a new standard and the C FAQ should be completely overhauled
to reflect the adoption of that new standard.


This is being addressed; see the "Other issues with the FAQ" thread.
(I don't agree that a complete overhaul is in order; the FAQ still
needs to be useful to the many programmers who don't have reliable
access to C99 compilers.)

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #16
"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > wrote in message
news:cd******** **@nntp1.jpl.na sa.gov...

[S. Summit's C FAQ]
This information is now almost a decade old.
There is a new standard and the C FAQ should be completely overhauled
to reflect the adoption of that new standard.


Here's a key point, I think. AFAIK, not many yet have really
'adopted' C99. Many still write to the C89 standard. I do
agree that it would be good to add C99 stuff to the FAQ, but
I also think C89 info should remain (and both should be clearly
distinguished from one another where the information differs.)

-Mike
Nov 14 '05 #17
E. Robert Tisdale wrote:
Steve Summit wrote:
E. Robert Tisdale wrote:
The C FAQ is obsolete.
It needs to be brought up-to-date.
When's the last time you looked at the version posted here?


I consult the C FAQ frequently.
...
http://www.eskimo.com/~scs/C-faq/q9.1.htm
http://www.eskimo.com/~scs/C-faq/q6.16.html
http://www.eskimo.com/~scs/C-faq/q11.1.html
This information is now almost a decade old.


I am the first to admit that the HTML version is badly out of date.
But that's not what I asked.
When's the last time you looked at the version posted to comp.lang.c?
I can't find any FAQ about the restrict keyword.


That's because there are no Frequently Asked Questions about
the restrict keyword. (But you're right, I should mention it
in question 11.28, the old `noalias' question. Thanks.)

Steve Summit
sc*@eskimo.com
Nov 14 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3885
by: Julian Hershel | last post by:
Hi. I want to to use the xs:boolean type for one of my elements. But is it possible to make these boolean values be read as Yes/No instead of true/false? Should I create a custom type for that? Thank you. Julian
8
43969
by: FrancisC | last post by:
how to define Boolean in C ? boolean abc; ??? is it default as True or False??
8
3267
by: Metro Sauper | last post by:
Why is the default text representation for booleans in C# 'True' and 'False' whereas in xml it is 'true' and 'false'? It seems like it would make sense to have them both the same. Metro T. Sauper, Jr. President Sauper Associates, Inc.
0
1276
by: Robert Love | last post by:
I am trying to save some boolean values from checkboxes using isolated storage. I am able to do strings and integers without a problem but I can't work out how to save boolean values without seeing the error message below: 'Additional information: Argument 'Prompt' cannot be converted to type 'String' The error message is displayed at this line of code in the form load event.
0
1382
by: ECathell | last post by:
Ok this may be a silly question...but here goes... I need to extend the boolean type. the reason for this is I have a base collection that has boolean properties. Then my inherited class has enumerated values that configure the Boolean value of the underlying class. The issue is I have a confirmation box that shows changed fields in my collection, but its showing both the enum values and the underlying Boolean value...If I make my...
10
16438
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not recognized as a valid Boolean. Public Sub UpdateCustomer_DashboardGraphs(ByVal sender As Object, ByVal e As System.EventArgs)
0
1264
by: Genken | last post by:
Hi ALL I currently have a project where i have to redefine certain table fields and their data types. The problem is i have fields to mimic or duplicate an access table, but the problem is that certain fields are boolean values with yes/no attributes. Sql server does not support boolean values to my understanding. The sql server corresponding fields are of type char which is updated in a webpage by entering y or n values. Is their a way i...
6
17516
by: =?iso-8859-2?Q?Marcin_Dzi=F3bek?= | last post by:
Hi All: I need to get (filter in) some dataview's rows with DBNULLs in column of boolean type: Actually to get the only rows with DBNULL, I use code like this: DV.RowFilter = "(IsNull(MyBooleanColumnName, True) = True) AND (IsNull(MyBooleanColumnName, False) = False)" or ex. DV.RowFilter = "(IsNull(MyIntegerColumnName, 1) = 1) AND (IsNull(MyIntegerColumnName, 0) = 0)" for columns of Integer...
19
14827
by: tshad | last post by:
I have a value in my sql table set to tinyint (can't set to bit). I am trying to move it into a boolean field in my program and have tried: isTrue = (int)dbReader and isTrue = Convert.ToBoolean((int)dbReader)
0
9735
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10997
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10661
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10718
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10347
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7067
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5731
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5917
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4134
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.