Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert RGB INTO Hexa Value
Message
From
16/07/2007 10:04:17
 
 
To
16/07/2007 09:59:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01240526
Message ID:
01240676
Views:
27
>>Let's not spend time arguing definitions. An integer is a whole number, period. In VFP an integer has a minimum value and a maximum, but that's VFP's own definiotin, or limitation if you want. An integer is by us humans counted in "groups of 10", usually called decimal numbers. A hex value is also a whole number, but counted in "groups og 16", or hexadecimal meaning 16 (hex=6, deci=10). "Group of 10" is not technically the same as "group of 16", but that's really not important. I have a university degree in mathematics, so I know very well what I am talking about.
>
>Same here.
>
>> However, it is more than 30 years since I graduated,
>
>Likewise... 28 years ago.
>
>>so I don't remember all the different technincal definitions in detail anymore. But I remember the basic, and an integer value is NOT the same as a hex value. But all programming languages I know, has a transparent two-way conversion, meaning that they can handle both integer values and hex values easily.
>
>My argument is that decimal whole numbers and hex numbers are just different representations of the same integers. The difference may be in the sign only, i.e. a hex value above 0x7fffffff may be taken as a negative or as a positive number, depending on whether it represents a signed or unsigned integer. But at the machine level, they are the same four bytes (assuming 32-bit integer arithmetic here).
>
>The conversion is done by the compiler, in practically any language I can remember - i.e. a string in the source code containing only digits is translated into an integer (assuming it's within the integer range) using a base 10 algorithm, and a hex string is translated into an integer using a base 16 algorithm. So it's a conversion from source code and the machine readable integer, not any sort of conversion between different kinds of numbers.
>
>>NB! I also don't have the ability to explain very well what I mean in english, so please be forgiving.
>
>Same here - English is my 2nd language (in order of appearance) and I can pretty well recognize when the co-speaker uses a word in a different meaning. Don't think it's the case here.

I make the conclusion that we totally agree! :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform