cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bdegg
Journeyman III

noob literals question

Hi everyone,

I'm learning IL, and the only thing I can't really figure out is the format of the literals.My question is this:

How do I convert numbers (float or int) into the 0x00000... format that literals use, and how does this change depending on the type? For instance, I wouldn't expect the code for (1) in float would be the same for (1) in int.

 

Thanks for your help

0 Likes
2 Replies

The only numbers the require a hex representation is double floats.

A quick way to switch int's into hex is to use "<number> as hex" in google and for floats use the following IEEE calculator.

http://babbage.cs.qc.edu/IEEE-754/

0 Likes

Thanks Micah!

0 Likes