|
-
Apr 22nd, 2001, 11:17 AM
#1
Thread Starter
Hyperactive Member
What are these : DWORD and there is another one? Are they typedefs?
Amon Ra
The Power of Learning.
-
Apr 22nd, 2001, 11:24 AM
#2
Monday Morning Lunatic
Yes. They're only defined when you include <windows.h> so they're not really the best thing to use.
DWORD == unsigned long
WORD == unsigned int
From this, it's obvious that they're the same size A bit pointless, really.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 22nd, 2001, 11:48 AM
#3
Addicted Member
I am not sure if long and int are machine dependant.
But usually the unsigned long is Double the Word size of the machine.
BUT When We say DWORD and WORD they are definitely
Machine dependant (ie..Size varies for 16-bit,32-bit or 64 bit Computer")
-
Apr 22nd, 2001, 12:17 PM
#4
Monday Morning Lunatic
The only machine-dependent type is int, and as a by-product I think that changes bool and enum. Not sure though.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 22nd, 2001, 12:48 PM
#5
Frenzied Member
So if you compiled on a SPARC you'd have a 128 bit int and a 32-bit long?
Harry.
"From one thing, know ten thousand things."
-
Apr 22nd, 2001, 12:53 PM
#6
Monday Morning Lunatic
Apparently that's what happens, according to the standard...bizarre I know 
Maybe you have sized types on a SPARC compiler...Sun tend to prefer doing that rather than breaking existing code.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 22nd, 2001, 01:31 PM
#7
Addicted Member
Originally posted by HarryW
So if you compiled on a SPARC you'd have a 128 bit int and a 32-bit long?
As per an article(in Paper..Don't ask me what it's dated. ) I read that
short int cannot be greater than int
and int cannot be greater than Long int.
Last edited by Active; Apr 22nd, 2001 at 02:13 PM.
-
Apr 22nd, 2001, 02:03 PM
#8
Frenzied Member
Originally posted by Active:
short int cannot be greater than int
and int cannot be greater than Long int.
Pure logic!
Last edited by CyberCarsten; Apr 22nd, 2001 at 02:07 PM.
-
Apr 22nd, 2001, 02:33 PM
#9
Thread Starter
Hyperactive Member
:)
I saw the DWORD and WORD in a directx example.
Amon Ra
The Power of Learning.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|