회원 로그인
|
MEL - 이동 제어문 continue
* 이동 제어문
break, continue, return
continue
반복 제어문 (while, for, do-while)안에 위치하며, break와 달리 제어문 처음으로 다시 이동하여 실행한다.
예제1)
$temp equals =0
Learning MAYA.
$temp equals =1
Learning MAYA.
$temp equals =2
Learning MAYA.
$temp equals =3
Learning MAYA.
$temp equals =4
$temp equals =5
$temp equals =6
$temp equals =7
$temp equals =8
$temp equals =9
$temp가 3보다 클 때 continue가 실행되었을 때 그 안에 어 반복문이 계속 수행하게 된다.
for ($temp = 0; $temp < 10; $temp = $temp + 1)
$temp 초기값을 0으로 하고, 10이 될때까지 반복 수행하고, $temp에 1씩 더해진다.
print ("$temp equals =" + $temp + "n");
() 안에 내용을 출력하게 된다. " "(string)을 그대로 출력하게 되고, +로 이어서 변수와 명령어를 출력하게 된다.
n은 한줄 띄기를 하게된다.
if ($temp > 3) continue;
$temp가 3보다 작을 경우 continue를 실행하여 안에 반복문을 계속 수행한다.
~ else print ("Learning MAYA. n");
$temp가 3보다 작을 경우 Learning MAYA.를 출력한다. continue문에 의해 3보다 클 경우 더 이상 수행하지 않게 된다.
break, continue, return
continue
반복 제어문 (while, for, do-while)안에 위치하며, break와 달리 제어문 처음으로 다시 이동하여 실행한다.
예제1)
for ($temp = 0; $temp < 10; $temp = $temp + 1) { print ("$temp equals =" + $temp + "n"); if ($temp > 3) continue; else print ("Learning MAYA. n"); }실행하면
$temp equals =0
Learning MAYA.
$temp equals =1
Learning MAYA.
$temp equals =2
Learning MAYA.
$temp equals =3
Learning MAYA.
$temp equals =4
$temp equals =5
$temp equals =6
$temp equals =7
$temp equals =8
$temp equals =9
$temp가 3보다 클 때 continue가 실행되었을 때 그 안에 어 반복문이 계속 수행하게 된다.
for ($temp = 0; $temp < 10; $temp = $temp + 1)
$temp 초기값을 0으로 하고, 10이 될때까지 반복 수행하고, $temp에 1씩 더해진다.
print ("$temp equals =" + $temp + "n");
() 안에 내용을 출력하게 된다. " "(string)을 그대로 출력하게 되고, +로 이어서 변수와 명령어를 출력하게 된다.
n은 한줄 띄기를 하게된다.
if ($temp > 3) continue;
$temp가 3보다 작을 경우 continue를 실행하여 안에 반복문을 계속 수행한다.
~ else print ("Learning MAYA. n");
$temp가 3보다 작을 경우 Learning MAYA.를 출력한다. continue문에 의해 3보다 클 경우 더 이상 수행하지 않게 된다.
댓글 0개
| 엮인글 0개
466개(19/24페이지)
번호 | 제목 | 글쓴이 | 조회 | 날짜 |
---|---|---|---|---|
마야 뷰포트 네비게이션 팁 | 푸딩뱃살 | 42797 | 2020.04.06 17:22 | |
Maya 버전 별 Python 버전 | 푸딩뱃살 | 64112 | 2014.01.08 17:59 | |
104 | [Script] Python for Maya - 2. select (선택) | artsOne | 5020 | 2008.02.20 23:18 |
103 | [Script] Python for Maya - 1. 시작 | artsOne | 5817 | 2008.02.19 13:45 |
102 | [참고] Simulating Musculature in Maya | artsOne | 3011 | 2008.02.17 18:41 |
101 | [Script] MEL - checkBox | artsone | 3306 | 2008.02.11 02:49 |
100 | [Script] 연산자(Operator) 정의 | artsone | 2473 | 2008.02.09 18:17 |
99 | [Script] 변수(Varialbe) 정의 | artsone | 2385 | 2008.02.02 19:00 |
98 | [Script] [스크랩] Expressions to scale, rotate and spin by Aziz Khan | artsone | 2736 | 2008.01.31 03:36 |
97 | [Base] 속성(Attribute) 정의 | artsone | 2029 | 2008.01.29 22:39 |
96 | [Script] MEL - 이동 제어문 return | artsone | 3192 | 2008.01.28 21:48 |
>> | [Script] MEL - 이동 제어문 continue | artsone | 3112 | 2008.01.28 21:17 |
94 | [Script] MEL - 이동 제어문 break | artsone | 3326 | 2008.01.28 21:01 |
93 | [Script] MEL - 반복 제어문 for | artsone | 3446 | 2008.01.25 21:12 |
92 | [Script] MEL - 반복 제어문 for-in | artsone | 3297 | 2008.01.28 22:39 |
91 | [Script] MEL - 반복 제어문 do-while | artsone | 2842 | 2008.01.25 20:58 |
90 | [Script] MEL - 반복 제어문 while | artsone | 3127 | 2008.01.23 23:46 |
89 | [Script] MEL - 조건 제어문 ?: | artsone | 3076 | 2008.01.23 23:12 |
88 | [Script] MEL - 조건 제어문 switch | artsone | 3140 | 2008.01.23 22:50 |
87 | [Script] MEL - 조건 제어문 if | artsone | 3905 | 2008.01.21 01:23 |
86 | [Script] Expression - rand | artsone | 2406 | 2008.01.20 23:43 |
85 | [Rendering] [스크랩] Maya software render에서 그림자에도 motion blur적용하는 방법 | artsone | 4700 | 2008.01.15 17:35 |