CØLLØSUS
-
Total Posts
:
21
- Scores: 2
-
Reward points
:
0
- Joined: 1/3/2011
-
Status: offline
|
Simple vbs script calculator
Sunday, January 09, 2011 8:28 PM
( permalink)
I Simple calculator, i hope it works do Dim a a=inputbox("put in your number:") b=inputbox("number you would like to multiply:") if not isnumeric (a) then wscript.quit end if if not isnumeric (b) then wscript.quit end if c=msgbox("Your Answer: "& a * b) loop
|
|
|
|
ehvbs
-
Total Posts
:
3321
- Scores: 110
-
Reward points
:
0
- Joined: 6/22/2005
- Location: Germany
-
Status: offline
|
Re:Simple vbs script calculator
Monday, January 10, 2011 3:01 AM
( permalink)
Less than poor, because: - the script serves no purpose
- the UI is rotten: asking for a number before telling about the operation, no feedback for bad input
- bad practices: no "Option Explicit", lousy variable names, unused variable
|
|
|
|
4CAMan
-
Total Posts
:
11
- Scores: 0
-
Reward points
:
0
- Joined: 1/9/2011
- Location: VA, United States of America
-
Status: offline
|
Re:Simple vbs script calculator
Monday, January 10, 2011 3:21 PM
( permalink)
corrected (with minor improvement) ================================ Option Explicit Dim a, b, c a=inputbox ("put in your number: ", "Multiplication- First Number") b=inputbox ("number you would like to multiply:", "Multiplication- Second Number") if not isnumeric (a) then wscript.quit end if if not isnumeric (b) then wscript.quit end if c=msgbox ("Your Answer: "& a * b, vbCritical, "Answer")
|
|
|
|
Brandon Flyte
-
Total Posts
:
3
- Scores: 0
-
Reward points
:
0
- Joined: 1/10/2011
-
Status: offline
|
Re:Simple vbs script calculator
Monday, January 10, 2011 10:36 PM
( permalink)
|
|
|
|