VB question
hi
Assuming that I have string with a value of "10+(5*4)/2^2", is there a function to evaluate that string ??
dim var as integer
dim string1 as string
string1 = "10+(5*4)/2^2"
var = evaluate(string1)
then var must equal 15 .
what is the "evaluate" function in VB ?
thnx n advance,and sorry for my bad English
http://abdulla-a2.port5.com
quote:Original post by beginner_directx
hi
Assuming that I have string with a value of "10+(5*4)/2^2", is there a function to evaluate that string ??
dim var as integer
dim string1 as string
string1 = "10+(5*4)/2^2"
var = evaluate(string1)
then var must equal 15 .
what is the "evaluate" function in VB ?
thnx n advance,and sorry for my bad English
http://abdulla-a2.port5.com
Don''t quote me on this but I think you can use a function called CallByName to do what you ask. You''ll have to look into the syntax though.
quote:Original post by Anonymous PosterOriginal post by beginner_directx
hi
Assuming that I have string with a value of "10+(5*4)/2^2", is there a function to evaluate that string ??
dim var as integer
dim string1 as string
string1 = "10+(5*4)/2^2"
var = evaluate(string1)
then var must equal 15 .
what is the "evaluate" function in VB ?
thnx n advance,and sorry for my bad English
http://abdulla-a2.port5.com
Don''t quote me on this but I think you can use a function called CallByName to do what you ask. You''ll have to look into the syntax though.
Sorry it turns out I was mistaken. You can only use CallByName to call a procedure.
Write your own. There might be some library which will do it, but it isn''t too hard to write, and your code should be faster. It isn''t that hard either.
Trying is the first step towards failure.
Trying is the first step towards failure.
thnx both
ragonastick, can you give me the key for accomplishing that ?
I have just started learning VB, and I want to make a good project for school.
http://abdulla-a2.port5.com
ragonastick, can you give me the key for accomplishing that ?
I have just started learning VB, and I want to make a good project for school.
http://abdulla-a2.port5.com
I would be grateful if someone could refer some tutorials on that matter.
http://abdulla-a2.port5.com
http://abdulla-a2.port5.com
it's Ok, I found it.
but now the problem is with Sin, Cos, Tan
It needs little work, but not hard to do.
anyway, thanx all
http://abdulla-a2.port5.com
[edited by - beginner_directx on March 21, 2002 12:21:01 AM]
but now the problem is with Sin, Cos, Tan
It needs little work, but not hard to do.
anyway, thanx all
http://abdulla-a2.port5.com
[edited by - beginner_directx on March 21, 2002 12:21:01 AM]
Hey, can you tell use the articles or what ever you found on it. I also just started learning VB and was wondering the exact same thing for making a calculator program.
Possibility
Possibility
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement