¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > ¹Ýº¹ Á¦¾î ¹®¹ý

µî·ÏÀÏ : 2017-07-03 20:02 Á¶È¸¼ö : 52,748

1. FOR ~ NEXT

FOR ~ NEXT ±¸¹®Àº µ¿ÀÏÇÑ Çü½ÄÀÇ ÀÛ¾÷À» ¹Ýº¹ÇÏ·Á ÇÒ ¶§ ÁÖ·Î »ç¿ëÇÏ´Â ±¸¹®ÀÔ´Ï´Ù.

ÀÌ·² ¶§ À¯¿ëÇÏ°Ô »ç¿ëµÇ´Â °ÍÀÌ ¹Ù·Î FOR ~ NEXT ±¸¹®ÀÔ´Ï´Ù.

¸¸¾à¿¡ 1ºÎÅÍ 10000±îÁöÀÇ ¼ýÀÚ¸¦ È­¸é¿¡ Ãâ·ÂÇ϶ó´Â ¸í·ÉÀÌ ¶³¾îÁ³À» ¶§,
FOR ~ NEXT ±¸¹®À» ÀÌ¿ëÇÏ¸é ´ÙÀ½°ú °°ÀÌ ¾µ ¼ö ÀÖ½À´Ï´Ù.
 

		DIM intLoop
		
		FOR intLoop = 1 TO 10000 STEP 1
    			Response.write intLoop & "<BR>"
		NEXT



ÀÌ·¸°Ô ÀÛ¼ºÇÑ ÈÄ ASP ÆäÀÌÁö¸¦ ½ÇÇà½ÃÅ°¸é - Á÷Á¢ Å×½ºÆ® Çغ¸´Â °Íµµ Àç¹ÌÀÖ½À´Ï´Ù -
1ºÎÅÍ 10000±îÁöÀÇ (1¾¿ Áõ°¡ÇÏ´Â) ¼ýÀÚµéÀÇ ³ª¿­À» º¸½Ç ¼ö°¡ ÀÖ½À´Ï´Ù.

FOR ~ NEXT ±¸¹®ÀÇ Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù.

FOR ½ÃÀÛ TO ³¡ STEPÁõ°¡
    ¹Ýº¹µÇ¾î ½ÇÇàµÉ ±¸¹®
NEXT

ÀϹÝÀûÀ¸·Î ¸¹ÀÌ ¾²ÀÌ´Â ¹æ½ÄÀº.. ½ÃÀÛ ºÎºÐ¿¡ ÀÛÀº ¼ö, ³¡ ºÎºÐ¿¡ Å« ¼ö¸¦ ³ÖÀº ´ÙÀ½ 1¾¿ Áõ°¡Çϸ鼭 ½ÇÇàÇÏ´Â ¹æ½ÄÀÔ´Ï´Ù.

2. DO WHILE

DO WHILE ¹®µµ FOR ~ NEXT ¹®°ú ¸¶Âù°¡Áö·Î µ¿ÀÏÇÑ Çü½ÄÀÇ ¹Ýº¹ ÀÛ¾÷½Ã¿¡ »ç¿ëÇÕ´Ï´Ù.
ÇÏÁö¸¸ FOR ~ NEXT ¹®ÀÌ ¹Ýº¹ ½ÇÇà Ƚ¼ö¸¦ Á¤È®ÇÏ°Ô ¾Ë°í ÀÖÀ» ¶§ ÁÖ·Î »ç¿ëÇÑ´Ù¸é,
DO WHILE ¹®Àº ½ÇÇà Ƚ¼ö¸¦ Á¤È®ÇÏ°Ô ¸ð¸£°í ÀÖÀ» ¶§, ¶Ç´Â ¼øȯÇÒ ¶§¸¶´Ù Á¶°ÇÀ» °Ë»çÇؼ­
°è¼Ó ¼øȯÇÒ Áö ¿©ºÎ¸¦ üũÇØ¾ß ÇÒ ¶§ »ç¿ëÇÏ´Â °ÍÀÌ À¯¸®ÇÕ´Ï´Ù.

À§¿¡¼­ FOR ~ NEXT ¹®¿¡¼­ »ç¿ëÇÑ ¿¹Á¦¸¦ DO WHILE ·Î º¯°æÇØ º¼±î¿ä?
 

		DIM intLoop
		intLoop = 1
		
		DO WHILE intLoop <= 10000
    			Response.write intLoop & "<BR>"
    			intLoop = intLoop + 1
		LOOP

 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.