Can anyone help out?
What values do they hold?
Can anyone help out?
What values do they hold?
Well the way microsoft and intel use them is
word 16 bits
dword 32 bits
can someone give an example for each (some declaration perhaps)?
so far, WORD is 16 bit and DWORD (I'm assuming "double word") is 32 bit.
are they used to hold chars or something?
that, or ebonics... word... word... [abbreviated as dword... for convienience...]
hasafraggin shizigishin oppashigger...
They hold numbers. For example:
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <windows.h>
int main(void)
{
DWORD start, end;
cout << "Hello." << endl;
start = GetTickCount();
Sleep(1000);
end = GetTickCount();
printf("start:%lu end:%lu\n",start,end);
printf("millisec elapsed: %lu\n",end-start);
cout << "Good bye." << endl;
cout << "Press <enter> to continue ...";
getch();
return 0;
}
Their basis is the word size of the processor (the width of it's registers). So a 16bit processor would have a word size of 16, a 32bit -32 etc. However the meaning has been altered slightly so that a WORD is always 16bit and a DWORD(double word) is 32bit, and I assume 64bit will be QWORD. A WORD is an unsigned 16bit integer and a DWORD is an unsigned 32bit integer, so they can hold variables of these types (or types that can be converted to one of them).
zen