asFloating
Top  Previous  Next

val = asFloating(expr) 

Converts argument to floating.

Parameters
 
expr  
 
Any expression.  

Remarks

Use asFloating if you want to be sure that a value is floating. If a variable was not declared with Dim then it can contain value of any type and can behave in different way in expressions.  
 
Example

str1 = "123.456"  
str2 = "456.789"  
print str1 + str2            ' result is "123.456456.789"  
print asFloating(str1) + asFloating(str2)   ' result is 580.245