# Problem with a mathematical type

Page 1 of 1

## 2 Replies - 560 Views - Last Post: 07 November 2012 - 03:15 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=299154&amp;s=8b6f37f71a0dbd35c162e7ee2ebc57bb&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 toketog

• New D.I.C Head

Reputation: 0
• Posts: 1
• Joined: 07-November 12

# Problem with a mathematical type

Posted 07 November 2012 - 02:28 PM

Hello i have this type: U=Uo+a*t

And i want to make code for vb, where the user will enter in textboxes the number of Uo,a,t and in the result box to show to result of U

Thank you very much

http://img405.images...97/52527614.png
Is This A Good Question/Topic? 0

## Replies To: Problem with a mathematical type

### #2 tlhIn`toq

• Not here as much anymore

Reputation: 6012
• Posts: 13,189
• Joined: 02-June 10

## Re: Problem with a mathematical type

Posted 07 November 2012 - 02:31 PM

toketog, on 07 November 2012 - 03:28 PM, said:

And i want to make code for vb [...]

Well go right ahead. You don't have to announce to us what you want to make. Have fun!

Calculator tutorial: FAQ 31

rookie: What this shows us is that you aren't familiar with breakpoints and how to debug your own code.

tlhIn`toq's FAQ list

Learning to debug one's own code is an essential skill. Sadly, one that apparently few college courses teach. Silly if you ask me.

Placing breakpoints and walking through the code line by line allows you to actually WATCH it execute.

Visualizing what your code does will let you see why it behaves the way it does.

It would be well worth your time to do the tutorials on FAQ 2. A couple hours learning this skill will save you hundreds of hours of confusion in one project alone.

TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Class1/Form1 talk to Class2/Form2

FAQ (Frequently Asked Questions - Updated NOV 2012
Spoiler

This post has been edited by tlhIn`toq: 07 November 2012 - 02:32 PM

Was This Post Helpful? 0

### #3 coder3788

• D.I.C Head

Reputation: 38
• Posts: 62
• Joined: 06-November 12

## Re: Problem with a mathematical type

Posted 07 November 2012 - 03:15 PM

Textboxes are controls that have properties. One of them is Text. When you insert values in them, Text holds the input. Text is a string. You do arithmetic on numbers.
Find out how to represent numbers (int,float,double,decimal,etc) and parse the strings to get numbers from them. When the user clicks Resaults (or Show result rather) ,replace the symbols from the equation with the actual numbers. Finally set the Text of the result textbox to the result of the equation (which is a number also), parsed as a string.

What you should learn from this, besides solving this particular problem is how to go about solving problems in general:
- decide what is the problem
- separate what you currently know about the problem from what you need to find out to solve it
- study what lies between your current knowledge and the solution
- solve it
Was This Post Helpful? 2

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }