메뉴 건너뛰기

enjoyTools.net

#5. 조건문

2015.02.22 15:38

꿈돌이 조회 수:4274

#5. 조건문


문법에 융통성이 없어서  괄호의 붙여쓰기와 띄어쓰기에 주의해야 함.


....


if()


myStatus = t

yourStatus = t


;1번 스타일

if( myStatus

print(myStatus)

myStatus = nil

print(myStatus)

else

print("here is else.")

)


;2번 스타일

if( (myStatus == t) || (yourStatus == t) then

print(myStatus)

myStatus = nil

print(myStatus)

else

print("here is else.")

)


;3번 스타일

if( myStatus == t then

print(myStatus)

myStatus = nil

print(myStatus)

else

print("here is else.")

)



case(), cond()





when(), unless()








번호 제목 글쓴이 날짜 조회 수
9 #8. map 시리즈 꿈돌이 2015.04.05 3947
8 #7. 리스트 꿈돌이 2015.04.04 1734
7 #6. 함수(프로시저) 꿈돌이 2015.02.22 10118
» #5. 조건문 꿈돌이 2015.02.22 4274
5 #4. 폼 꿈돌이 2015.02.22 4536
4 #3. 순환문 꿈돌이 2015.02.22 1046
3 #2. 출력문 꿈돌이 2015.02.21 5502
2 #1. 기본 문법 꿈돌이 2015.02.21 1923
1 #0. 개요 꿈돌이 2015.02.21 2077