pointer

Discussion in 'JavaScript' started by keenlearner, Dec 31, 2007.

  1. #1
    Please help me these :

    1. what is the exact use of the "main", as a pointer ?
    2. What is it called in Javascript. so that I can search in google and learn more about it.
    3. How can I implement these in PHP ?

    Thank you.

    <script>
    
    function test()
    {
     main:
      for(i=0; i <5; i++)
        {
       if(i == 1)
        continue main;
        document.write('in main'+'<br>');
       
         
      }
    }
    
    test();
    
    </script>
    Code (markup):

     
    keenlearner, Dec 31, 2007 IP
  2. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What are you trying to do?
     
    MMJ, Dec 31, 2007 IP
  3. keenlearner

    keenlearner Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I saw some js code something like that, now I know what is the use of it already. Thanks.
    It's something like
    continue [NUMBER];
    in PHP.
     
    keenlearner, Jan 1, 2008 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah, form SitePoint forums. :rolleyes:
     
    MMJ, Jan 1, 2008 IP