Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What exactly is a
Message
From
24/11/2004 06:26:35
 
 
To
23/11/2004 16:40:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00964046
Message ID:
00964193
Views:
12
Albert

Essentially - as to why they're referred to as words, yet hold numeric, the more bytes in a memory location the huger the number that can be stored in it. So, what is it? - without doing all the maths, and if my memory serves me well, a word (of 4 bytes)can hold 64Kb - a dword (of 8 bytes) 4Gb? This all depends on ones interpretation of how many bytes to each (and I don't want to get into a fight over this :-)

Terry

>Hi Y'all,
>
>Trying to name a function correctly to put it into my library of functions. The following function was pulled from the UT and I want to rename it - but I don't exactly know what a DWORD is. Here is the function:
>
>
>FUNCTION buffer2dword(lcBuffer)
>
>RETURN ASC(SUBSTR(lcBuffer, 1,1)) + ;
>    ASC(SUBSTR(lcBuffer, 2,1)) * 256 +;
>    ASC(SUBSTR(lcBuffer, 3,1)) * 65536 +;
>    ASC(SUBSTR(lcBuffer, 4,1)) * 16777216
>
>
>
>Looking up some definitions via Google, it says "double word" but in this case, it contains a numeric value. Why would they call it a "word" when it contains a number?
>
>Also, what would you call something that is stored as base 256 (the passed in string seems to be base 256). I was thinking of calling the above function 'StringToDWord' but 'string' is a bit ambigous. Note: if worrying about a function name seems 'anal', I have a large library of functions and I think it is important to name them correctly!
>
>Thanks,
>Albert Gostick
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform