473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to get string formula output

1
Hi All,

I just wanna ask one simply question..
Is there anyone know how to calculate the output value from a string like
that??

Expand|Select|Wrap|Line Numbers
  1. Dim strFormula As String = "20+30+(100+20+30)*0.1"
  2. Dim douOutput As Double
  3.  
  4. douOutput = Function(strFormula)
what can i do to calculate the dynamic formula string and put it into the
variable "douOutput" ??

Thanks All,
Jun 12 '14 #1
1 1076
Luk3r
300 256MB
Expand|Select|Wrap|Line Numbers
  1.         Dim strForumla As String = 20 + 30 + (100 + 20 + 30) * 0.1
  2.         Dim douOutput As Double
  3.  
  4.         douOutput = strForumla
Jun 12 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dim | last post by:
Hi, need some help/idea... I have data table in Excel(about 30 columns) and it's getting too big (over 65K) so I need to move it to DB (MS Access is the choice) one of the columns (for example...
3
by: Brooke | last post by:
I am new to access, so please excuse ignorance. Within my table (contacts) I have a text field (other). What I am trying to do is collect all of the text input from the field 'other', separate each...
2
by: Salman | last post by:
When I run the below method with a 64 character string as input such as: sr.Encrypt("1234567890123456789012345678901234567890123456789012345678904444"); I get square boxes as my output, which...
5
by: VM | last post by:
If I have a string variable with a formula: string sMyformula = "3.3*5.2*5"; How can I convert this to a mathematical formula that the compiler can calculate? For all purposes, the formula in...
4
by: Wade | last post by:
Hi guys, I am building a string in code that is a mathematical formula, based on a lot of criteria specified by the user. Once the formula is complete, I want to evaluate it to get a result. ...
1
by: Joe Van Dyk | last post by:
#include <string> #include <vector> #include <iostream> class Element { public: Element(std::string n) : name_(n) {}; std::string serialize() const {
7
by: junky_fellow | last post by:
Hi guys, I want to write a null terminated string to the standard output. I don't want to use printf as it may be costly. I am using "puts" library function, but it appends the newline to the...
0
by: humberto.bortolossi | last post by:
Greetings! I would like to know if there is a C library (free or not) that converts a string formula to TeX code. For instance, "(a + b)/2" is converted to "\frac{a + b}{2}". Thanks in...
1
by: japss | last post by:
I have got a column in my table which stores mathematical formulas as strings. The base question is how do I evaluate the "string formula" to get result? For example, I got a value like...
4
by: Alfredo73 | last post by:
Hi, In the user input of a textbox I would like that the user can input a formula to make it easier for him. So instead of inputing 400 I would like the user to have the possibility to input as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.