Home Su

Codice utilizzato per il programma "Prevedo"

Quando si clicca sul pulsante "Prevedo", viene attivato il seguente codice:

Sub Command1_Click ()


text1.text = ""
hvf$ = "Heinz Von Ficker dice: " + Chr$(13) + Chr$(10)
If check1.value Then a = 1 Else a = 0
If check2.value Then b = 10 Else b = 0
If check3.value Then c = 100 Else c = 0
If check4.value Then d = 1000 Else d = 0
If check5.value Then e = 10000 Else e = 0
If check6.value Then f = 100000 Else f = 0
If check7.value Then g = 1000000 Else g = 0
If check8.value Then h = 2 Else h = 0
If check9.value Then i = 20 Else i = 0

tot = a + b + c + d + e + f + g + h + i
'regola n.1
If tot = 11 Then text1.text = hvf$ + "Indizi di persistente bel tempo."
'regola n.2
If tot = 1101 Then text1.text = hvf$ + "E' in arrivo una depressione."
'regola n.3
If tot = 11001 Then text1.text = hvf$ + "Indizio di persistente condizione ciclonica."
'regola n.4
If tot = 111000 Then text1.text = hvf$ + "Questi indizi segnano la transizione verso il dorso della depressione e preannunciano l'arrivo di onde di freddo."
'regola n.5
If tot = 1011000 Then text1.text = hvf$ + "|Il rasserenamento non è ancora imminente!"
'regola n.6
If tot = 1010010 Then text1.text = hvf$ + "E' in vista un pronto rasserenamento."
'regola n.7
If tot = 1000110 Then text1.text = hvf$ + "Prendono sviluppo condizioni anticicloniche; esse durano sino a che al suolo la pressione cominci a decrescere."
'regola n.8
If tot = 2 Then text1.text = "Condizioni favorevoli ai temporali."
'regola n.9
If tot = 20 Then text1.text = "Condizioni favorevoli alla formazione di nebbie."

End Sub

 
Questa pagina è stata realizzata da Vittorio Villasmunta

Ultimo aggiornamento: 29/11/14