3 - condiciones corona sdk

5
CURSO - TUTORIAL Condiciones Marco Arreguín Youtube.com/user/marcoarreguin

Upload: marco-arreguin

Post on 21-Aug-2015

29 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: 3 - Condiciones Corona SDK

CURSO - TUTORIAL

Condiciones

Marco Arreguín

Youtube.com/user/marcoarreguin

Page 2: 3 - Condiciones Corona SDK

Condiciones

Page 3: 3 - Condiciones Corona SDK

Condiciones

a = 13

if (a>5) then--Aquí va el código si se cumple la operación

else--Aquí va el código si NO se cumple la

operaciónend

a = 13

if (a>11) then--Aquí va el código si se cumple la operación

end

Page 4: 3 - Condiciones Corona SDK

Condiciones

Operadores lógicosNot -> Invierte el valorOr -> OAnd -> Y

Ejemplo AND-- Deben devolver TRUE las dos operaciones para devolver un TRUE GENERALa = 13if (a>1 and a<10) then

--Aquí va el código si se cumple la operaciónend

Page 5: 3 - Condiciones Corona SDK

Condiciones

Ejemplo OR-- Deben devolver TRUE por lo menos una de las operaciones para devolver un TRUE GENERAL

a = 13if (a==20 or a<10) then

--Aquí va el código si se cumple la operaciónend