Help With Code
#1
Posted 25 August 2010 - 07:55 PM
My problem:
I have a Visual Basic problem and i have the code, i want to put this program in my cfx-9850gb, how ?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim landa As Double = Double.Parse(TextBox1.Text)
Dim serv As Double = Double.Parse(TextBox2.Text)
Dim p As Double = Double.Parse(TextBox1.Text) / Double.Parse(TextBox2.Text)
Dim l, lq, w, wq As Double
Dim desocupado As Double = 0
If (p < 1) Then
TextBox3.Text = "Factor abaixo de 1"
l = landa / (serv - landa)
TXTL.Text = l.ToString()
lq = (landa * landa) / (serv * (serv - landa))
TXTLq.Text = lq.ToString()
w = 1 / (serv - landa)
TXTW.Text = w.ToString()
wq = landa / (serv * (serv - landa))
TXTWq.Text = wq.ToString()
desocupado = 1 - p
TextBox8.Text = desocupado.ToString()
Else
TextBox3.Text = "Factor >=1"
End If
End Sub
End Class
any help??
It's to calculate an MM1
Thanks
#2
Posted 27 August 2010 - 08:47 AM
Hi
My problem:
I have a Visual Basic problem and i have the code, i want to put this program in my cfx-9850gb, how ?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim landa As Double = Double.Parse(TextBox1.Text)
Dim serv As Double = Double.Parse(TextBox2.Text)
Dim p As Double = Double.Parse(TextBox1.Text) / Double.Parse(TextBox2.Text)
Dim l, lq, w, wq As Double
Dim desocupado As Double = 0
If (p < 1) Then
TextBox3.Text = "Factor abaixo de 1"
l = landa / (serv - landa)
TXTL.Text = l.ToString()
lq = (landa * landa) / (serv * (serv - landa))
TXTLq.Text = lq.ToString()
w = 1 / (serv - landa)
TXTW.Text = w.ToString()
wq = landa / (serv * (serv - landa))
TXTWq.Text = wq.ToString()
desocupado = 1 - p
TextBox8.Text = desocupado.ToString()
Else
TextBox3.Text = "Factor >=1"
End If
End Sub
End Class
any help??
It's to calculate an MM1
Thanks
Ok i have a 9750 g+ so i can't help you completley but i can tell you that the programming language is similar but not the same. EG you cant have private subs and to end a loop, it is if end or while end not end while. there aren't textboxs in a calculator program. you really have to research a bit and start at the basics to fully understand the difference.
(I use visual basic so i know what your talking about.)
#3
Posted 11 October 2010 - 10:26 PM
#4
Posted 11 October 2010 - 10:58 PM
' / -> Division sign ' [Display] is the display triangle (shift+prgm+F5) ' * is multiplication symbol x "Landa"?->L "Serv"?->S L/S->P ' If statement below, reversed from the original for clarity. If P>=1 Then "Factor >=1" Else "Factor abaixo de 1" "l= ": L / (S - L) [Display] "lq= ": (L * L) / (S * /(S -L))[Display] "w=":1/(S-L) [Display] "wq=":L/(S*(S-L))[Display] "desocupado":1-P[Display] IfEnd
Edited by TovAre, 11 October 2010 - 11:01 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users