ElseIf vs Else If
Durante años he estado usandoElse If
codificar en VBScript ...
If a = b Then
...
Else If a = c Then
...
End If
Lo que parece funcionar según sea necesario. También he visto muchos sitios en la web que usanElse If
, excepto MSDN que usaElseIf
.
¿Hay alguna diferencia entreElseIf
versusElse If
?
Aquí hay uno que codifiqué anteriormente que funciona bien a través de ASP clásico:
If IsDate(wD) Then
wS = wD
Else If wD&"" <> FormatDisplayDate(wS) Then
wS = WeekStart(Date())
wD = FormatDisplayDate(wS)
End If
Aquí hay un fragmento de un código antiguo, escrito por otra persona ...
if opip = "IP" then
opip = "In Patient"
Else If opip = "OP" then
opip = "Out Patient"
End If
Ninguno de estos se ejecuta a través de un compilador, sin embargo, todo se interpreta.
Ignora esa basura: estropeé una búsqueda y la reemplacé en el IDE.