AJUDA COM CODIGO VB NET
Estou reescrevendo um codigo em vb6 alguem pode me ajudar com esse trecho preciso dele em vb6 ?
x = If(b(2) > &H80, -(b(2) - &H80), b(2))
y = If(b(3) > &H80, -(b(3) - &H80), b(3))
eu fiz assim mas não sei se esta correto
If b(2) > &H80 Then
x = b(2) - &H80
End If
If (b(3) > &H80) Then
y = b(3) - &H80
End If
x = If(b(2) > &H80, -(b(2) - &H80), b(2))
y = If(b(3) > &H80, -(b(3) - &H80), b(3))
eu fiz assim mas não sei se esta correto
If b(2) > &H80 Then
x = b(2) - &H80
End If
If (b(3) > &H80) Then
y = b(3) - &H80
End If
alguem?
Esta linha
x = If(b(2) > &H80, -(b(2) - &H80), b(2))
é basicamente um if ... else ...
x = If(b(2) > &H80, -(b(2) - &H80), b(2))
é basicamente um if ... else ...
If b(2) > &H80 Then
x = -(b(2) - &H80)
Else
x = b(2)
End If
Tópico encerrado , respostas não são mais permitidas