Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum val ( )
Message
From
30/07/2006 19:23:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01141681
Message ID:
01141691
Views:
13
>I want to sum numbers in a field but they are in a character field
>
>**********************************
> sum val(numbers) to my_number
>
> ? my_number
>
>**********************************
>
> results in a strange caracter like 2403.1 + 10
>
>How can I do so I can result a integer number?

I think sum val(Numbers) is correct.

Do you know about scientific notation? The example you give looks to me like a number in scientific notation; a real example might be 2.4031E+9. This result appears when the number is very big or very small.

The above example, 2.4031E+9, is a shortcut way of writing 2.4031 * 10^9. In other words, take the original number and move the decimal point 9 positions to the right.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform