Why isn't there a native double/float type?


#1

I really don’t understand why there isn’t a native double/float type in UiPath surely most numerical data found in spreadsheets/financial applications would be in decimal form, integers are fine for loop counting but most real world application numerical values will be of the form ##.## (in my experience) or any simple division is potentially going to give you a non integer result which is going to cause an issue with your int32 type?

Is it because you generally want to be dealing with values as strings when retrieving or passing them to applications? And if you want to check if they are valid numbers you perform a type conversion on them in a try catch activity.


#2

Hi,

You can find datatypes from the browse for types options under the variable type column in the variables panel.
If I have understood in different way, please let me know what you are expecting.


#3

Hi sarathi125,

Thanks for responding.

I know you can browse for other data types but the 4 native types are Int32 bool string and object I’m just wondering why there isn’t a native double type or numeric instead of int32 which could take any type of number value.


#4

Hi,

I think we have double,


#5

Thanks Sarathi but I assume you had to browse to find it I’m just saying that, to me it should be a core type. I just wondered if anyone could say why in the main types available (in the variable type drop down) don’t naturally include it or why the numeric type included in the native types (boolean, int32, string, object, array) is int32 rather than something that could hold double values, is there a logical reason for it to be an int (maybe to make it easier for beginners to deal with numbers for easy examples without having to do any type conversions for example)