Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curious if I am thinking about this right.
#3
A way for less lines employs the new _IIF keyword Plus some strategic rearrangement:
Code: (Select All)
Const Conv# = 25.4 '25.4 mm every inch

Dim op% 'which operation (either in to mm or mm to in
Dim num As Double ' a number to convert

Input "Enter a Number to convert "; num
Input "Enter Either 1 for conversion to mm from inches or 2 vice versa "; op%
If op% = 1 Or op% = 2 Then Print _IIf(op% = 1, num * Conv#, num / Conv#)
b = b + ...
Reply


Messages In This Thread
RE: Curious if I am thinking about this right. - by bplus - 11 hours ago



Users browsing this thread: 13 Guest(s)