Convert String with embedded operator to Numeric

VinceC

Newcomer
Joined
May 30, 2003
Messages
15
Location
Ontario, Canada
I have 2 strings, say

Visual Basic:
MyString1="2/10"
MyString2="50%"

Is there a "way" to convert both strings to a numeric value? CType and CDbl don't quite do it.

Thx.
 
You mean take the string, parse it and calculate the result? You have to that yourself, but it shouldnt be very hard to write a function like that.
 
I thought so. I was just wondering if there was some type of method that would evaluate a string expression and convert it to numeric. Thanks anyhow.
 
I was just wondering if there was some type of method that would evaluate a string expression and convert it to numeric. Thanks anyhow.

You can use my parser and evaluator.

see the singature

bye!
 
Back
Top