I know that it is possible to assign hexadecimal values to a float, but I don`t know how to do it:frusty:.

Is this correct ?????

Code:`float hex_test = 0x17.2`

Printable View

- 06-20-2012, 07:26 AMkashiqirphanAssigning hexadecimal value to float
I know that it is possible to assign hexadecimal values to a float, but I don`t know how to do it:frusty:.

Is this correct ?????

Code:`float hex_test = 0x17.2`

- 06-20-2012, 07:58 AMKsharpRe: Assigning hexadecimal value to float
Maybe you can't .

float hex_test = 17.2f ;

Ksharp - 06-20-2012, 10:28 AMDarrylBurkeRe: Assigning hexadecimal value to float
You can. You do need the type suffix though.

Chapter*3.*Lexical Structure

https://blogs.oracle.com/darcy/entry...point_literals

db - 06-20-2012, 12:52 PMJosAHRe: Assigning hexadecimal value to float
- 06-20-2012, 01:44 PMkashiqirphanRe: Assigning hexadecimal value to float
- 06-20-2012, 01:55 PMJosAHRe: Assigning hexadecimal value to float
- 06-20-2012, 03:20 PMkashiqirphanRe: Assigning hexadecimal value to float
Thanks JosAH. Well explained !

- 06-20-2012, 03:27 PMkashiqirphanRe: Assigning hexadecimal value to float