Results 1 to 9 of 9

Thread: _word

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Unhappy

    What are these : DWORD and there is another one? Are they typedefs?
    Amon Ra
    The Power of Learning.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  3. #3
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    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")
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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."

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  7. #7
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    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.
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  8. #8
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    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.
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  9. #9

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    :)

    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
  •  



Click Here to Expand Forum to Full Width