Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a String only with numeric values
Message
From
15/05/2004 08:20:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/05/2004 03:24:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00903931
Message ID:
00904309
Views:
21
>Hi Hilmar,
>
>Not a good solution, what if the string is for instance "12,34e7abcde"? (Answer: 123400000,00)

Well, that is an interesting example - what to do with it would depend on what the expected answer in this case is. I mean, you might indeed have numbers in scientific notation at the beginning of a text-field.

>
>>If your number is at the beginning of the string, you can use val(). You may want to use transform() first, to replace comma with point.
>>
>>>Hi all
>>>
>>>I need to retrive from a string only the numeric characters, comma, and point
>>>like this,
>>>
>>>a="12,30asdfsdfs" i need a=12,30
>>>a="12.25rtrtrt11" i need a=12.25
>>>a="23,30        " i need a=24,30
>>>
>>>
>>>João Batista
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