Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

ConteudoAnimal.com.br

Como adicionar um AND numa cláusula IF ?

Recommended Posts

Ola

O código no final funciona normalmente

Eu quero adicionar no if isMobile() then um AND .... por exemplo if isMobile() AND v > 0 then

Já tentei de várias formas sem sucesso ... se alguem hospeda site na godaddy e sabe como funciona poderia me ajudar ?

Já tentei 

if isMobile() AND v > 0 then

if (isMobile() AND v > 0) then

if ((isMobile()) AND (v > 0)) then

Nenhum desse funcionou !!!!!!!!!!!!!!!!!!!!!!!!!!

Agradeço a atenção !

<%
Function isMobile()
Dim sys : sys = "android"
v = InStr(lCase(Request.ServerVariables("HTTP_USER_AGENT")),sys)
if v <> 0 then : isMobile = true : exit function : else : isMobile = false
End function

v1 = Request.ServerVariables("URL")

if isMobile() then
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "https://play.google.com/store/apps/details?id=com.Conteudo_Animal"
End if
%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Simples

if v >1 and v < 3 then
	response.write("numero igual a 2")
elseif v >=1 and v < 2 then
	response.write("numero igual a 1")
end if

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

dependendo da situação é melhor usar um SELECT CASE

Compartilhar este post


Link para o post
Compartilhar em outros sites
Em 2017-5-9 at 17:11, Gilberto Jr disse:

Simples


if v >1 and v < 3 then
	response.write("numero igual a 2")
elseif v >=1 and v < 2 then
	response.write("numero igual a 1")
end if

 


Gilberto,

Eu te agradeço pela ajuda !

Para minha surpresa funcionou perfeitamente !!

Obrigado novamente !

Marcos

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.