how to cast variables using letters

  • Thread starter Thread starter Abraham Andres Luna
  • Start date Start date
A

Abraham Andres Luna

hello everyone,

i seen some code that declared a float like this:

float f = 0.5F;

is there a chart somewhere that oulines all the letters for the data types.
i'm not sure what keyword to even search for.

thanks for your help.
 
...
i seen some code that declared a float like this:

float f = 0.5F;

is there a chart somewhere that oulines all the letters for the data
types.
i'm not sure what keyword to even search for.

The letter is called a "literal suffix".

I don't know if there's a table for them, but you can find them in the
specs:

http://msdn.microsoft.com/library/d...en-us/csspec/html/vclrfcsharpspec_2_4_4_3.asp

http://msdn.microsoft.com/library/d...en-us/csspec/html/vclrfcsharpspec_2_4_4_2.asp


/// Bjorn A
 
thanks for the replies. it looks like there are not suffixes for shorts :(


| hello everyone,
|
| i seen some code that declared a float like this:
|
| float f = 0.5F;
|
| is there a chart somewhere that oulines all the letters for the data
types.
| i'm not sure what keyword to even search for.
|
| thanks for your help.
|
|
 
Abraham,

If you are talking about Int16 then no there is no suffix for that. Just
type the number. As a matter of fact if you put suffix it wont compile.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top