| 전자부품 데이터시트 검색엔진 |
|
UM0715 데이터시트(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0715 데이터시트(HTML) 9 Page - STMicroelectronics |
|
9 / 24 page ![]() UM0715 Basic command Doc ID 15798 Rev 2 9/24 FOR The FOR statement consists of three parts, the initial set-up value, a TO value, and an optional STEP value. 10 DIM array(100) 20 FOR I = 1 TO 100 30 PRINT I 40 NEXT I will print hundred values. The variable in the NEXT statement must be the same as that in the matching FOR. FOR loops may be nested to a maximum depth of 32. 10 DIM chess(8,8) 20 FOR I = 1 TO 8 30 FOR J = 1 TO 8 40 chess(j,i) = 1.0 50 NEXT J 60 NEXT I The step value does not need to be 1, and may be negative. For instance: 10 FOR I = 1 TO 10 STEP 2 20 PRINT I 30 NEXT I 40 FOR I = 10 TO 1 STEP ?0.3 50 PRINT I 60 NEXT I The initial, to, and step values are calculated once on entering the FOR loop, they are then constant. 10 LET x = 10 20 FOR I = 1 TO x STEP x/5 30 PRINT I 35 REM Next line has no effect 40 LET x = x + 1 50 NEXT I If the TO value is lower than the initial value (or higher if the STEP value is negative) then the loop does not execute. Control passes to the first matching NEXT. It is important not to jump out of FOR ... NEXT loops, or get the nesting order wrong, otherwise control flow will become confused. To terminate a loop prematurely, set the counter to the TO value, and jump to the matching NEXT. Usage FOR id = numeric TO numeric STEP numeric ... NEXT id Table 1. Basic commands (continued) Name Remarks |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |