473,466 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

define a data type of 1 bit size

Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel
Nov 14 '05 #1
21 8653
"Angel Lopez" <an*******@hotmail.com> wrote in message
news:9d**************************@posting.google.c om...
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.


If you don't have too many of them, using a built-in type such as char or
even int is fine - just use zero for 0 and non-zero for 1.

If you want lots (and lots) of them in an array, you can save memory and
perhaps get better performance by using an unsigned type such as unsigned
int and writing simple functions or macros to access them by specifying a
bit index. The optimal type will depend on the platform, but it's easy to
write code so you can change the type to experiment if and when you find
performance to be a problem.

Compilers for some microcontrollers (such as 8051-alikes) have extensions to
the language that allow you to define bit variables. Bit variables are
typically more useful in these embedded environments where memory may be
very limited.

Alex
Nov 14 '05 #2
Angel Lopez wrote:
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel

In C99 you can write:
#include <stdbool.h>

bool myvar = 1;

This will take a char (8 bits). You can't address bits so this will be
the same in all compilers. The advantage is that if you write
myvar=78;
printf("%d\n",myvar);
that will print 1 and not 78.

jacob
Nov 14 '05 #3
MVC++6 allows a boolean type which will port almost nowhere and takes up a
byte anyways. Although I've never laid eyes on ANSI, I thought the deal was
that bytes always have eight bits and all data types are a multiple of
bytes. You could certainly write a program to squeeze eight ones or zeros
into a byte, but I think it's a stretch to call what results a proper data
type. MPJ
"Angel Lopez" <an*******@hotmail.com> wrote in message
news:9d**************************@posting.google.c om...
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel

Nov 14 '05 #4
On Mon, 06 Sep 2004 16:50:46 +0200, jacob navia
<ja***@jacob.remcomp.fr> wrote in comp.lang.c:
Angel Lopez wrote:
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel In C99 you can write:
#include <stdbool.h>

bool myvar = 1;

This will take a char (8 bits). You can't address bits so this will be
the same in all compilers. The advantage is that if you write


No, this will be at least sizeof(char), which is 8 bits on most
platforms but larger on others. And there are some implementations
that use (un)signed ints for _Bool.

What is the same on all compilers is that you cannot have any objects
smaller than one byte in size, however many bits a byte may contain.
myvar=78;
printf("%d\n",myvar);
that will print 1 and not 78.

jacob


--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #5
On 6 Sep 2004 06:35:19 -0700, an*******@hotmail.com (Angel Lopez)
wrote in comp.lang.c:
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel


This just can't be done in C. Bit-fields are only allowed inside
structures, and other than bit-fields, no object is allowed to be
smaller than sizeof(char).

If you actually have a large enough number of these values that memory
space becomes important, the FAQ for this group has an example of
packing multiple bits into larger data types.

See http://www.eskimo.com/~scs/C-faq/q20.8.html

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #6
On Mon, 6 Sep 2004 10:32:09 -0500, "Merrill & Michele"
<be********@comcast.net> wrote in comp.lang.c:

First, don't top-post. Material you add in a reply belongs after
quoted material you are commenting on. If you don't want to get a
real newsreader, use Google to search for a patch to Outlook Express
that defaults the entry point in replies to the proper location.

MVC++6 allows a boolean type which will port almost nowhere and takes up a
byte anyways. Although I've never laid eyes on ANSI, I thought the deal was
that bytes always have eight bits and all data types are a multiple of
bytes. You could certainly write a program to squeeze eight ones or zeros
into a byte, but I think it's a stretch to call what results a proper data
type. MPJ


You thought wrong. A byte in C contains CHAR_BIT bits, this macro
defined in <limits.h>. It must be at least 8, but may be more and is
16 or 32 on some implementations.

You were right about the fact that all objects must be a multiple, 1
or more, of sizeof(char).

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #7
"Merrill & Michele" <be********@comcast.net> wrote in message news:<Lq********************@comcast.com>...
Although I've never laid eyes on ANSI, I thought the deal was
that bytes always have eight bits and all data types are a multiple of
bytes.


ANSI guarantees that "char" has _at least_ eight bits. Moreover, it
guarantees that a "char *" can access _any_ bit in memory[1].

Bear with me.

For example, on the 80x86 architecture memory is divided in the eight
bit chunks we've all come to know and love as "bytes". So "char" does
the sensible thing and defaults to eight bits also [2].

Now, let's take the PDP-10. This strange beast has it's memory divided
into 36 bits words. If "char" would've been eight bits, we wouldn't be
able to access (36 % 8) = 4 bits per word, which is _bad_.
So, as a work-around, "char" consists of nine bits and all is well
again because (36 % 9) = 0.

On a final note, don't use bit fields. There are a lot of compilers
out there that don't support them (properly)

Ben Noordhuis

[1] I'm obviously not taking MMU restrictions in account here ;-)
[2] Please note that "sensible" doesn't mean "mandatory". It would be
perfectly legal for a x86-compiler to use 32 bits for "char" instead.
Nov 14 '05 #8
What does a fella do? On the one hand, I'm told that I'm posting
improperly. On the other, I can't discern my lack of net nuchego without
observing my own posts.

We need to discuss this issue, as, in my belief, it does not arise in FAQ's.
If a single person posts under me witgh an opinion that a data type has less
than 8 bits, then you need to come to grips with the legacy of LeRoy Wentz.

MPJ

"Jack Klein" <ja*******@spamcop.net> wrote in message
news:v8********************************@4ax.com...
On 6 Sep 2004 06:35:19 -0700, an*******@hotmail.com (Angel Lopez)
wrote in comp.lang.c:
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
Thanks,
Angel


This just can't be done in C. Bit-fields are only allowed inside
structures, and other than bit-fields, no object is allowed to be
smaller than sizeof(char).

If you actually have a large enough number of these values that memory
space becomes important, the FAQ for this group has an example of
packing multiple bits into larger data types.

See http://www.eskimo.com/~scs/C-faq/q20.8.html

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html

Nov 14 '05 #9
Merrill & Michele wrote:

What does a fella do? On the one hand, I'm told that I'm posting
improperly. On the other, I can't discern my lack of net nuchego
without observing my own posts.


Before you go any further correct your top-posting habit. Your
reply goes after, or intermixed with, the quoted material, AFTER
snipping out anything that is not germane to your reply. That way
each article is readable and stands more or less by itself.

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush.
"If I knew then what I know today, I would still have invaded
Iraq. It was the right decision" - G.W. Bush, 2004-08-02

Nov 14 '05 #10
bn********@gmail.com (Ben Noordhuis) writes:
"Merrill & Michele" <be********@comcast.net> wrote in message
news:<Lq********************@comcast.com>...
Although I've never laid eyes on ANSI, I thought the deal was
that bytes always have eight bits and all data types are a multiple of
bytes.
ANSI guarantees that "char" has _at least_ eight bits. Moreover, it
guarantees that a "char *" can access _any_ bit in memory[1].

[footnote moved up] [1] I'm obviously not taking MMU restrictions in account here ;-)
A "char *" can access any byte of any accessible object. For any byte
outside an accessible object (either a declared object or one
allocated by malloc(), calloc(), or realloc()), all bets are off.

[...]
On a final note, don't use bit fields. There are a lot of compilers
out there that don't support them (properly)


I don't know of any C compilers that don't support bit fields
properly. The layout isn't guaranteed to be consistent from one
compiler to another, but there's no such guarantee for ordinary struct
members either.

--
Keith Thompson (The_Other_Keith) 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 #11
In <ch**********@news-reader1.wanadoo.fr> jacob navia <ja***@jacob.remcomp.fr> writes:
Angel Lopez wrote:
Sorry if I am too naive, but this is my first post...
I have a binary variable (it can contain either a 0 or a 1).
Is there any way I can define a data type that uses only 1 bit. So
far I have defined it as a char variable. I've searched everywhere but
I don't seem to find any place that explains how to define this type
of data type. The closest thing I've found are bit fields in
structures, I would like something like bit fields but without the
structure.
something like
unsigned MyVariable :1;
In C99 you can write:
#include <stdbool.h>

bool myvar = 1;

This will take a char (8 bits).
Can I have a chapter and verse for this?
You can't address bits so this will be the same in all compilers. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ditto.
The advantage is that if you write
myvar=78;
printf("%d\n",myvar);
that will print 1 and not 78.


You don't need any C99 features for that:

int myvar = 78;
printf("%d\n", !!myvar);

For individual boolean variables, int is usually the best choice (there
are platforms where accessing char's has additional overheads). It's
only when you have to deal with *large* amounts of booleans that you need
to start thinking about saving space.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #12
In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> writes:
bn********@gmail.com (Ben Noordhuis) writes:
"Merrill & Michele" <be********@comcast.net> wrote in message
news:<Lq********************@comcast.com>...
Although I've never laid eyes on ANSI, I thought the deal was
that bytes always have eight bits and all data types are a multiple of
bytes.


ANSI guarantees that "char" has _at least_ eight bits. Moreover, it
guarantees that a "char *" can access _any_ bit in memory[1].

[footnote moved up]
[1] I'm obviously not taking MMU restrictions in account here ;-)


A "char *" can access any byte of any accessible object.


Nope, only "unsigned char *" has this property. Plain char may not be
able to access full bytes (due to the padding bits issues).

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #13
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
ANSI guarantees that "char" has _at least_ eight bits. Moreover, it
guarantees that a "char *" can access _any_ bit in memory[1].
[1] I'm obviously not taking MMU restrictions in account here ;-)


A "char *" can access any byte of any accessible object. For any byte
outside an accessible object (either a declared object or one
allocated by malloc(), calloc(), or realloc()), all bets are off.


True. I should've mentioned that as well. Stupid me.
On a final note, don't use bit fields. There are a lot of compilers
out there that don't support them (properly)


I don't know of any C compilers that don't support bit fields
properly. The layout isn't guaranteed to be consistent from one
compiler to another, but there's no such guarantee for ordinary struct
members either.


Trust me on this one: on some of the more exotic
architectures/compilers bit fields cause all sorts of weird behavior,
if they are supported at all. Use the &, | and ^ operators and all is
well again.

I've had some rather frustrating experiences with this. The reason I'm
not really sure about but my best bet is that the original compiler
didn't support bit fields and had them patched in later on (but alas,
not too well). I've heard similar stories from friends working on
another architecture.
Of course, this means the compiler is broken, not the Standard. But
it's little trouble to AND, OR and XOR yourself.
Nov 14 '05 #14
In <54**************************@posting.google.com > bn********@gmail.com (Ben Noordhuis) writes:
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
I don't know of any C compilers that don't support bit fields
properly. The layout isn't guaranteed to be consistent from one
compiler to another, but there's no such guarantee for ordinary struct
members either.
Trust me on this one: on some of the more exotic
architectures/compilers bit fields cause all sorts of weird behavior,
if they are supported at all.


We don't care about compilers that do not implement any of the common
C specifications: K&R, C89, C99. All these specifications require
support for bit fields and define their behaviour, up to a couple of
issues (order of allocation and the semantics of plain int).
Of course, this means the compiler is broken, not the Standard. But
it's little trouble to AND, OR and XOR yourself.


It makes a huge difference in the code readability. Especially when
you have to deal with someone else's code...

Of course, if you're forced to use broken tools, you may have no choice,
but until then, there is no point in avoiding bit fields.

The real issue with them is that you cannot *portably* map a certain
bit layout with bit fields, which is a pity, because certain protocols
and hardware interfaces are defined in terms of bit fields. So,
maximally portable code must perform conversions between the internal
bit field layout (which is under compiler control) and the external
bit field layout (which is specified by the application).

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #15
bn********@gmail.com (Ben Noordhuis) writes:
Keith Thompson <ks***@mib.org> wrote in message
news:<ln************@nuthaus.mib.org>...

[...]
On a final note, don't use bit fields. There are a lot of compilers
out there that don't support them (properly)


I don't know of any C compilers that don't support bit fields
properly. The layout isn't guaranteed to be consistent from one
compiler to another, but there's no such guarantee for ordinary struct
members either.


Trust me on this one: on some of the more exotic
architectures/compilers bit fields cause all sorts of weird behavior,
if they are supported at all. Use the &, | and ^ operators and all is
well again.


Do you have examples?

Bit fields have been part of the core language since before K&R1 was
published. (I'm actually not sure when they were introduced.) If a
compiler didn't support them properly, I wouldn't trust it to do
anything else correctly either. It could as easily have implemented
bit fields correctly but had some subtle bugs in the implementation of
the &, |, and ^ operators (though those are admittedly easier to get
right). Perhaps you were using a compiler that was still under
development.

Another thing to keep in mind is that bit fields are often misused.
The only valid types for a bit field are unsigned int, signed int, and
int (which may be treated as either signed or unsigned) (and bool or
_Bool in C99). And of course the only guarantee is that you'll get
back what you stored in them; they can't be used reliably to control
layout.

As Dan wrote, if you're stuck with a broken or incomplete compiler,
you may have to use a few workarounds, but it's unwise to let those
workarounds influence the way you write code for *real* compilers.
The standard is a contract between the implementer and the programmer;
it exists so programmers can safely assume that certain things will
work in certain ways.

--
Keith Thompson (The_Other_Keith) 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
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
bn********@gmail.com (Ben Noordhuis) writes:
Keith Thompson <ks***@mib.org> wrote in message
news:<ln************@nuthaus.mib.org>... [...]
On a final note, don't use bit fields. There are a lot of compilers
out there that don't support them (properly)

I don't know of any C compilers that don't support bit fields
properly. The layout isn't guaranteed to be consistent from one
compiler to another, but there's no such guarantee for ordinary struct
members either.


Trust me on this one: on some of the more exotic
architectures/compilers bit fields cause all sorts of weird behavior,
if they are supported at all. Use the &, | and ^ operators and all is
well again.


Do you have examples?

Bit fields have been part of the core language since before K&R1 was
published. (I'm actually not sure when they were introduced.) If a
compiler didn't support them properly, I wouldn't trust it to do
anything else correctly either. It could as easily have implemented
bit fields correctly but had some subtle bugs in the implementation of
the &, |, and ^ operators (though those are admittedly easier to get
right). Perhaps you were using a compiler that was still under
development.


The code was meant to run on an embedded system using a stripped down
386SX with a reduced instruction set. The compiler used was "pcc"
IIRC, targeted for cross-compilation. It had a few bugs, some more
subtle than others, but they were all fairly well documented.
Except for the trouble with bit fields.
But yes, if it wasn't in the development stage, it was at least a case
of "work in progress".

I've heard of a few other people complaining about problems with bit
fields as well but I don't know which architecture/compiler they
were/are using.
Another thing to keep in mind is that bit fields are often misused.
The only valid types for a bit field are unsigned int, signed int, and
int (which may be treated as either signed or unsigned) (and bool or
_Bool in C99). And of course the only guarantee is that you'll get
back what you stored in them; they can't be used reliably to control
layout.

Of which I am aware :-)
As Dan wrote, if you're stuck with a broken or incomplete compiler,
you may have to use a few workarounds, but it's unwise to let those
workarounds influence the way you write code for *real* compilers.
The standard is a contract between the implementer and the programmer;
it exists so programmers can safely assume that certain things will
work in certain ways.


Yes and no.

Yes, as in: a compiler calling itself "ANSI C" should conform to the
Standard. Not just loosely but entirely, so programmers know what to
expect. That's what the Standard is for.

No, as in: it's no effort to use the bit-wise operators instead of bit
fields and if my code becomes just that little bit (no pun intended)
more portable by doing so, why refrain from it?
Nov 14 '05 #17

"CBFalconer" <cb********@yahoo.com> wrote in message
news:41***************@yahoo.com...
Merrill & Michele wrote:

What does a fella do? On the one hand, I'm told that I'm posting
improperly. On the other, I can't discern my lack of net nuchego
without observing my own posts.


Aha--so this is what you're getting at. (Continued below)
Before you go any further correct your top-posting habit. Your
reply goes after, or intermixed with, the quoted material, AFTER
snipping out anything that is not germane to your reply. That way
each article is readable and stands more or less by itself.

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush.
"If I knew then what I know today, I would still have invaded
Iraq. It was the right decision" - G.W. Bush, 2004-08-02


Is this a correct posting? MPJ
Nov 14 '05 #18
Merrill & Michele wrote:
"CBFalconer" <cb********@yahoo.com> wrote in message
Merrill & Michele wrote:

What does a fella do? On the one hand, I'm told that I'm posting
improperly. On the other, I can't discern my lack of net nuchego
without observing my own posts.


Aha--so this is what you're getting at. (Continued below)
Before you go any further correct your top-posting habit. Your
reply goes after, or intermixed with, the quoted material, AFTER
snipping out anything that is not germane to your reply. That way
each article is readable and stands more or less by itself.

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush.
"If I knew then what I know today, I would still have invaded
Iraq. It was the right decision" - G.W. Bush, 2004-08-02


Is this a correct posting? MPJ


Much better, except you neglected to snip. For example my sig
above (everything following the "-- " line inclusive) should go.
It stays here because I am referring to it, and without it my
reply would not make sense.

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush.
"If I knew then what I know today, I would still have invaded
Iraq. It was the right decision" - G.W. Bush, 2004-08-02
Nov 14 '05 #19

On Wed, 8 Sep 2004, Merrill & Michele wrote:

"CBFalconer" <cb********@yahoo.com> wrote...
Merrill & Michele wrote:
What does a fella do? On the one hand, I'm told that I'm posting
improperly. On the other, I can't discern my lack of net nuchego
without observing my own posts.

Aha--so this is what you're getting at. (Continued below)


/What/ is "what you're getting at"? Your "reply" doesn't seem to
follow from the "context." You need to quote some context, so that
your posts follow some sort of logical, conversational,
question-and-answer style.
Is this a correct posting? MPJ


No. You need to learn to put your responses following the material
to which you're responding. For crying out loud, just look at the
way /every other person in this newsgroup/ does it! It's not like it's
some mystical thing you have to be trained in!
And snip sigs if they're not relevant to your post. Snip /anything/
that's not relevant to your post. Just like every other person in this
newsgroup.
Read the archives if you're having trouble.

HTH,
-Arthur
Nov 14 '05 #20
Dan Pop <Da*****@cern.ch> spoke thus:
Nope, only "unsigned char *" has this property. Plain char may not be
able to access full bytes (due to the padding bits issues).


I thought that there was also the possibility of generating a trap
representation...?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #21
....snips....
/What/ is "what you're getting at"? Your "reply" doesn't seem to
follow from the "context." You need to quote some context, so that
your posts follow some sort of logical, conversational,
question-and-answer style.
Is this a correct posting? MPJ


No. You need to learn to put your responses following the material
to which you're responding. For crying out loud, just look at the
way /every other person in this newsgroup/ does it! It's not like it's
some mystical thing you have to be trained in!
And snip sigs if they're not relevant to your post. Snip /anything/
that's not relevant to your post. Just like every other person in this
newsgroup.
Read the archives if you're having trouble.

HTH,
-Arthur


Not that you're interested in biographical details, but I'm not a syntax
guy. That's why I have books on my shelves. I do, however, occasionally
avail myself of help from the internet, and, as I stated, am using a
newsgroup for the first time. Following the rules for this type of forum is
itself a syntax, and sytaxes I work up as required. I wanted to use a
question that nobody cares all that much about to learn how to be here
without my interaction itself causing trouble. Thank you for helping me
post properly. I shall now ask a question about which I care. MPJ
Nov 14 '05 #22

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

Similar topics

3
by: robert | last post by:
Hi All, I have a problem. I have written a COM DLL in VB6 to do some stuff. I need to call this DLL from a VC++ program for which I have the code. I have managed to get as far as creating the...
5
by: Angel Lopez | last post by:
Sorry if this appears twice but my first try didn't seem to make it. but this is my first post (hopefully)... I have a binary variable (it can contain either a 0 or a 1). Is there any way I can...
9
by: jc | last post by:
Hi all, I have a data type to use that I can't modify its codes. E.g. This template data type is data_type. When I declare a variable of this data_type, I write as following: data_type(8,...
12
by: Just D | last post by:
All, It was possible before in Pascal, C++, etc. to define our custom data type or redefine the existing type, like in Turbo Pascal we could assume that shortint is int and use all references to...
13
by: lane straatman | last post by:
I'm trying to figure out what data type is appropriate to represent a card in a game. The idea that I thought was going to work was a struct, foo, with two integer fields and two fields of char...
76
by: KimmoA | last post by:
First of all: I love C and think that it's beautiful. However, there is at least one MAJOR flaw: the lack of a boolean type. OK. Some of you might refer to C99 and its _Bool (what's up with the...
3
by: jacob navia | last post by:
Abstract: Continuing the discussion about abstract data types, in this discussion group, a string collection data type is presented, patterned after the collection in C# and similar languages...
2
by: =?Utf-8?B?R3JlZw==?= | last post by:
I'm using VB.Net 2005 and am defining parameters for a stored procedure using the following code snippet. MyBase.sqlAddParameter("@strExtension", _ SqlDbType.NVarChar, 4, _...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.