Un ejemplo de if else anidados

Sub ComprobarCuadrante()
	Dim x, y
	x = Rhino.getreal("coordenada x:")
	y = Rhino.getreal("coordenada y:")
	If x = 0 And y = 0 Then
		Rhino.Print "Origen"
	Else
		If x = 0 Then
			If y > 0 Then
				rhino.print "y +"
			Else
				rhino.print "y -"
			End If
		Else
			If y = 0 Then
				If x < 0 Then
					rhino.print "x -"
				Else
					rhino.print "x +"
				End If
			Else
				If x > 0 Then
					If y > 0 Then
						rhino.print "I"
					Else
						rhino.print "IV"
					End If
				Else
					If y > 0 Then
						rhino.print "II"
					Else
						rhino.print "III"
					End If
				End If
			End If
		End If
	End If
End Sub

No Comments yet »

RSS feed para los comentarios de esta entrada. TrackBack URI

Deja un comentario

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.