Click here to Skip to main content
15,920,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Serialising objects which change alot Pin
cnurse18-Jan-04 1:24
cnurse18-Jan-04 1:24 
GeneralRe: Serialising objects which change alot Pin
Ray Cassick19-Jan-04 16:51
Ray Cassick19-Jan-04 16:51 
GeneralRe: Serialising objects which change alot Pin
cnurse20-Jan-04 2:06
cnurse20-Jan-04 2:06 
GeneralH-E-L-P!!! please.... Pin
Anonymous16-Jan-04 21:42
Anonymous16-Jan-04 21:42 
GeneralRe: H-E-L-P!!! please.... Pin
cnurse16-Jan-04 23:56
cnurse16-Jan-04 23:56 
GeneralRe: H-E-L-P!!! please.... Pin
acecase17-Jan-04 0:48
acecase17-Jan-04 0:48 
GeneralRe: H-E-L-P!!! please.... Pin
Anonymous17-Jan-04 3:39
Anonymous17-Jan-04 3:39 
GeneralRe: H-E-L-P!!! please.... Pin
cnurse17-Jan-04 21:44
cnurse17-Jan-04 21:44 
OK, thanks for the clarification....

A = B x C in VB Speak....

Sub DoSomethingClever()

Dim A as integer ' Here is an integer number, can't handle decimal parts

A = 10 * 10 ' A = 100 i.e. A = 10 x 10 the * is x in progrmaming terminolgy

Dim B as integer

B = A * 10 ' Now B = 1000 get it so far?

Dim C as integer

C = B / 100 ' Now C = 10

Dim MyWage as Single = 100.55 ' Make a floating point variable and assign it value in 1 step

MyWage = MyWage * 1000 ' I wish! No wage is multiplied and stored back into the variable as 100550.00

End Sub

You can do things like this now

A = A / 2 ' A is divided by 2
A = (B*B) ' A = B^2

A = B + C
A = A - B

All of the above are things you can type into VB literally and they will work.

I think there is a mathematical function called power or pwr which raises a number to a given power.

If you are in VB.NET look up the Math namespace as it contains all the cos sin and tan functions to name a few.

This ain't the answer to your functions but you can work it out now. If not then shout for more help. I think you do need to read a little about Sub's and Function's and where to use them. For example

private function MyAge () as integer

Dim a as integer = 21

Return a

End Function

A short example of creating a variable, assigning it a value and returning that value, therefore...

Dim B as integer = MyAge

Assigns B the value 21, because VB calls the MyAge function which "Returns" the value of a which = 21.

Clear as mud, I know, but I'm trying to help you find the answer rather than just spew lines of code that you might not understand if things go wrong.


Nursey
QuestionEvents-Application Idle -Help? Pin
Member 76608416-Jan-04 18:25
Member 76608416-Jan-04 18:25 
AnswerRe: Events-Application Idle -Help? Pin
gpa200021-Jan-04 4:15
gpa200021-Jan-04 4:15 
GeneralRegistry Pin
Jblake0016-Jan-04 4:46
Jblake0016-Jan-04 4:46 
Questionany caller id supporting modem available in india ? Pin
Mohan G16-Jan-04 4:32
Mohan G16-Jan-04 4:32 
AnswerRe: any caller id supporting modem available in india ? Pin
Sarvesvara (BVKS) Dasa28-Mar-04 0:06
Sarvesvara (BVKS) Dasa28-Mar-04 0:06 
GeneralOne more Help Please!! Pin
Het210916-Jan-04 1:41
Het210916-Jan-04 1:41 
GeneralRe: One more Help Please!! Pin
Jblake0016-Jan-04 4:41
Jblake0016-Jan-04 4:41 
GeneralRe: One more Help Please!! Pin
Niels Penneman16-Jan-04 6:08
Niels Penneman16-Jan-04 6:08 
GeneralNiel, Pin
Het210916-Jan-04 18:17
Het210916-Jan-04 18:17 
GeneralRe: One more Help Please!! Pin
Guillermo Rivero16-Jan-04 8:55
Guillermo Rivero16-Jan-04 8:55 
GeneralGuillermo! u are great,, Pin
Het210916-Jan-04 18:13
Het210916-Jan-04 18:13 
GeneralRe: Guillermo! u are great,, Pin
Guillermo Rivero16-Jan-04 18:19
Guillermo Rivero16-Jan-04 18:19 
GeneralAny Setup Expert around! Pin
Het210916-Jan-04 1:25
Het210916-Jan-04 1:25 
GeneralRe: Any Setup Expert around! Pin
Niels Penneman16-Jan-04 6:10
Niels Penneman16-Jan-04 6:10 
GeneralRe: Any Setup Expert around! Pin
Het210916-Jan-04 18:24
Het210916-Jan-04 18:24 
GeneralMSMQ Pin
prashant_gh16-Jan-04 0:55
prashant_gh16-Jan-04 0:55 
GeneralUninstalling Windows Services W2003 Pin
AnadinE15-Jan-04 21:06
AnadinE15-Jan-04 21:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.