On BASIC coding
Alright there is a very very simple idea that I use as the basis of my life. Do the bare minimum of work to achive the desired results. Now denise on the other hand has a rather odd relationship with Dims and constants.
now an example of code for a very very simple project that we had to do in computer science
My code
Private Sub cmdexit_Click()
Beep
End
End Sub
Private Sub cmdG_Click()
If opt1 = True Then
Txt2 = txt1 * 25 * 1.17
ElseIf opt2 = True Then
Txt2 = txt1 * 35 * 1.17
ElseIf Opt3 = True Then
Txt2 = txt1 * 15 * 1.17
End If
End Sub
Her Code
Private Sub cmdCalculate_Click()
Dim sTrees, sTotal As Single
Const sPST = 1.1
Const sGST = 1.07
Const sFur = 25
Const sPine = 35
Const sSpruce = 15
sTrees = Val(txtTrees.Text)
sTotal = Val(txtTotal.Text)
If optFur.Value = True Then
sTotal = ((sFur * sPST) * sGST) * sTrees
ElseIf optPine.Value = True Then
sTotal = ((sPine * sPST) * sGST) * sTrees
ElseIf optSpruce.Value = True Then
sTotal = ((sSpruce * sPST) * sGST) * sTrees
End If
End Sub
now mine works and her does not what does that tell you about the length of programs
_____________________--
If you immediatly know that the candle is flame then the meal was cooked long ago
End If Kris
3 Comments:
my coding is obviously much better than yours Kris.... because i use DIMs and CONSTs :) oh ya! weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
DIM sDenise
happy 4/20..........TOKE BOTTLE BOY lol... i'm never going to let you forget that :p
DIM sDenise
zzzz....wha? is it funny yet? no? zzzzz......
Post a Comment
<< Home