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, 08: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, 08:58 AMKsharpRe: Assigning hexadecimal value to float
Maybe you can't .

float hex_test = 17.2f ;

Ksharp - 06-20-2012, 11: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, 01:52 PMJosAHRe: Assigning hexadecimal value to float
- 06-20-2012, 02:44 PMkashiqirphanRe: Assigning hexadecimal value to float
- 06-20-2012, 02:55 PMJosAHRe: Assigning hexadecimal value to float
- 06-20-2012, 04:20 PMkashiqirphanRe: Assigning hexadecimal value to float
Thanks JosAH. Well explained !

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