Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account

# vb.net coding help with sub procedures

### #1 diamond5 Posted 05 October 2006 - 01:22 PM

diamond5

New Member

• Member
• 2 posts
Please I really need help with learning code for vb.net.I need to make a procedure that computes the exponentiation(base^ęxponent).How do I write a check number function that receives a number(type string),that validates a parameter as a number,and returns a Boolean value that indicates if the number is valid or not.I am writing a program that will compute the exponentiation of the "Base" number raised to the "exponent" number.help:
• 0

### #2 IO-error Posted 06 October 2006 - 01:33 AM

IO-error

Member

• Member
• 276 posts
Math Functions

Function | Description
Abs | Returns the absolute value of a specified number
Atn | Returns the arctangent of a specified number
Cos | Returns the cosine of a specified number (angle)
Exp | Returns e raised to a power
Hex | Returns the hexadecimal value of a specified number
Int | Returns the integer part of a specified number
Fix | Returns the integer part of a specified number
Log | Returns the natural logarithm of a specified number
Oct | Returns the octal value of a specified number
Rnd | Returns a random number less than 1 but greater or equal to 0
Sgn | Returns an integer that indicates the sign of a specified number
Sin | Returns the sine of a specified number (angle)
Sqr | Returns the square root of a specified number
Tan | Returns the tangent of a specified number (angle)

--------------------

Operator | English | Example | Result
+ | Add | 8+7 | 15
- | Subtract | 11-10 | 1
* | Multiply | 7*8 | 56
/ | Divide | 8/2 | 4
^ | Exponent | 2^4 | 16
Mod | Modulus | 15 Mod 10 | 5

Edited by IO-error, 06 October 2006 - 01:34 AM.

• 0

### #3 diamond5 Posted 06 October 2006 - 12:52 PM

diamond5

New Member

• Topic Starter
• Member
• 2 posts
I am not sure how to do the code,for this type of program.
• 0

### #4 IO-error Posted 09 October 2006 - 12:47 AM

IO-error

Member

• Member
• 276 posts
Then your not really writing a program, your just waiting till others script it for you...

I have no idea how it's written either, but if I have to do a calculation, first that comes is the number, then the calculation symbols, then another number to calculate with.

ex.: 1+1
- | Subtract | 11-10
* | Multiply | 7*8
/ | Divide | 8/2
^ | Exponent | 2^4
Mod | Modulus | 15 Mod 10

Get it now?
• 0

### #5 Hai Mac Posted 11 October 2006 - 02:18 PM

Hai Mac

Member

• Member
• 260 posts
I have no idea what's the second thing you are asking for, but maybe you can explain that later. With the sub procedure, just create one and allow it to accept two variables, something like, Var1 and Var2. Call the procedure something like... er... Exponent?

Add a line: Exponent = Var1^Var2

And voila, call the procedure and you should get the answer. Sorry, is this answering your problem?
• 0

### Similar Topics

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users