Re: BYTE and DWORD
- From: "toby" <toby@xxxxxxxxxxxxxxxxxxx>
- Date: 17 Jan 2006 22:13:36 -0800
David Phillip Oster wrote:
> In article <1h99y6j.1wuqm7tp0mce2N%burt@xxxxxxxxxxxxxxxxx>,
> burt@xxxxxxxxxxxxxxxxx (Burt Johnson) wrote:
>
> > David - thanks for your help. That definitely got me well past that
> > initial startup problem.
> >
> > I now find that the prior code is using
> >
> > typedef BYTE
> >
> > and
> >
> > typedef DWORD
> >
> > and that the compiler is saying 'parse error before xxx' (xxx being the
> > variable following those keywords)
> >
> > Does OC (what _is_ the accepted shorthand for Objective-C? Can't see
> > typing that out every time...) not have those types? I presume they are
> > called by a different name?
> >
> > And what is a good way to find stuff like that? ...
>
> Is a BYTE signed or unsigned?
>
> Is a DWORD signed or unsigned? Is it 32 bits or 64 bits?
I had to hit MSDN for it (ewwwww) but here's a summary:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_data_types.asp
BYTE An 8-bit integer that is not signed.
DWORD A 32-bit unsigned integer ...
>
> If you are sure that no-one on your project will ever get confused, you
> add typedefs yourself to your XXXX_Prefix.pch file.
Unless there is a good reason, and there rarely is, don't create yet
another homebrew bunch of generic integer types for your project.
Either use C's standard types (have always been good enough for me,
anyway), the perfectly good sized types provided by Apple (or M$, if
you swing that way) but don't roll your own. Think of the children.
--T
> ...
.
- Follow-Ups:
- Re: BYTE and DWORD
- From: Uli Kusterer
- Re: BYTE and DWORD
- References:
- MAC_OS_X_VERSION_MAX_ALLOWED?
- From: Burt Johnson
- Re: MAC_OS_X_VERSION_MAX_ALLOWED?
- From: David Phillip Oster
- BYTE and DWORD
- From: Burt Johnson
- Re: BYTE and DWORD
- From: David Phillip Oster
- MAC_OS_X_VERSION_MAX_ALLOWED?
- Prev by Date: Re: custom UI "pages" for PackageMaker?
- Next by Date: Re: BYTE and DWORD
- Previous by thread: Re: BYTE and DWORD
- Next by thread: Re: BYTE and DWORD
- Index(es):
Relevant Pages
|