loop

7 Results

Dictionary

loop

In programming, a repetition within a program. Whenever a process must be repeated, a loop is set up to handle it. A program has a main loop and a series of minor loops, which are nested within...

Dictionary

Definition: loop

In programming, a repetition within a program. Whenever a process must be repeated, a loop is set up to handle it. A program has a main loop and a series of minor loops, which are nested within the main loop. Learning how to set up loops is what programming technique is all about.

The following example prints an invoice. The main loop reads the order record and prints the invoice until there are no more orders to read. After printing date and name and addresses, the program prints a variable number of line items. The code that prints the line items is contained in a loop and repeated as many times as required.


loop


Loops are accomplished by various programming structures that have a beginning, body and end. The beginning generally tests the condition that keeps the loop going. The body comprises the repeating statements, and the end is a GOTO that points back to the beginning. In assembly language, the programmer writes the GOTO, as in the following example that counts to 10.

          MOVE     "0" TO COUNTER
   LOOP   ADD      "1" TO COUNTER
          COMPARE  COUNTER TO "10"
          GOTO     LOOP IF UNEQUAL
          STOP


In high-level languages, the GOTO is generated by the interpreter or compiler; for example, the same routine as above using a WHILE loop.

       COUNTER = 0
       DO WHILE COUNTER <> 10
          COUNTER = COUNTER + 1
       ENDDO
       STOP


For a more detailed look at a loop, look at the end of the C definition. The main event loop of the DOS version of this database is presented.



Sponsored White Papers, Webcasts & Resources

  • Quest Migration Assessment Tool (QMAT)

    Download this assessment tool to compare Microsoft Exchange with Google Gmail and Sharing Tools. You'll see what they do best, and why you should pick one over the other.

  • Loopt out of the loop on location-based gaming

    I rarely have something negative to say about a product or service, but today I woke up ashamed and embarrassed for Loopt. They launched a new product called "Loopt Star" (which, as of the time...

    Blog posts | June 1, 2010 7:40am PDT

  • Microsoft KIN: Unboxing and hands-on with the KIN ONE and KIN TWO

    Microsoft announced their new KIN ONE and KIN TWO devices today and I had the chance to spend time with both devices. Check out my videos, image gallery, and thoughts on these two devices.

    Blog posts | April 12, 2010 2:06pm PDT

  • Microsoft unveils a new deeply social phone: KIN

    Project Pink becomes KIN, a combination of hardware and software to make you and your phone experience more social.

    Blog posts | April 12, 2010 12:20pm PDT

  • GrooveMaker is a loop junkie dream come true

    Groovemaker is an amazing app that turns the iPhone or iPod into a portable 8-track loop machine. Unlike other apps, it's not complicated and you can sound like a pro DJ with little to no instruction.

    Blog posts | November 19, 2009 1:00am PST

  • Apple music/iPod event rumored for September

    MediaMemo citing "music industry sources" reports that Apple is planning a keynote event for the week of September 7th. Apple has held similar events in September for the past four years, so it...

    Blog posts | August 13, 2009 10:29pm PDT

  • Updated: Recycled ink cartridges in your garden?

    UPDATED TO FIX BAD LINK AND REPLACE PHOTO Printer maker Lexmark is the first U.S. printer maker to ink (at least publicly and, yes, pun intended) a deal with Close the Loop, a recycling concern...

    Blog posts | September 2, 2008 3:02pm PDT

  • NetSuite, integration and the local loop

    Opal Telecom, one of NetSuite's largest customers, is using integration and custom workflow to improve customer service - something that's sorely needed in the UK telecoms market, as my experience...

    Blog posts | June 22, 2007 12:51pm PDT

Additional Results

  • The importance of the social feedback loop in the enterprise

    There needs to be a solid process in place to support the feedback loop required to add value to your social media initiatives.

    Blog posts | February 16, 2011 7:36am PST

  • Loopt out of the loop on location-based gaming

    I rarely have something negative to say about a product or service, but today I woke up ashamed and embarrassed for Loopt. They launched a new product called "Loopt Star" (which, as of the time...

    Blog posts | June 1, 2010 7:40am PDT

  • Microsoft KIN: Unboxing and hands-on with the KIN ONE and KIN TWO

    Microsoft announced their new KIN ONE and KIN TWO devices today and I had the chance to spend time with both devices. Check out my videos, image gallery, and thoughts on these two devices.

    Blog posts | April 12, 2010 2:06pm PDT

  • Microsoft unveils a new deeply social phone: KIN

    Project Pink becomes KIN, a combination of hardware and software to make you and your phone experience more social.

    Blog posts | April 12, 2010 12:20pm PDT

  • LoopFuse turns open source heritage into big brother sales tool

    LoopFuse's OneView automates the lead management process by taking all the data that even anonymous visitors give to your site and delivering a "360 degree view" on each prospect.

    Blog posts | December 10, 2009 6:29am PST

  • GrooveMaker is a loop junkie dream come true

    Groovemaker is an amazing app that turns the iPhone or iPod into a portable 8-track loop machine. Unlike other apps, it's not complicated and you can sound like a pro DJ with little to no instruction.

    Blog posts | November 19, 2009 1:00am PST

  • At CTIA, Verisign, iLoop partner to deliver mobile services

    When it comes to mobile, there are a lot of moving parts. Multiple carriers, operating systems, device manufacturers, technologies and even regulations from one country to the next can make it...

    Blog posts | October 7, 2009 2:30am PDT

  • Apple music/iPod event rumored for September

    MediaMemo citing "music industry sources" reports that Apple is planning a keynote event for the week of September 7th. Apple has held similar events in September for the past four years, so it...

    Blog posts | August 13, 2009 10:29pm PDT

  • Closing the loop: CIT gets rescue; Relief for tech spending

    The failure of CIT, a financial services firm that lends to small and mid-sized business, has reportedly been averted for now. The Wall Street Journal reported that CIT's bondholders are floating...

    Blog posts | July 20, 2009 6:15am PDT

  • Closing the loop: Howard Stern picks BlackBerry Bold over Pre

    Howard Stern got his Palm Pre demo and picked the BlackBerry Bold instead. As noted last week, Palm worked the word of mouth marketing for the Pre and received a lot of air time from Stern. That...

    Blog posts | April 6, 2009 4:14am PDT

  • Global warming accelerating

    New information shows coal burning in the developing world is generating feedback mechanisms that accelerate global warming faster than previously thought.

    Blog posts | February 15, 2009 8:41pm PST

  • Closing the loop: Circuit City's liquidation

    I was surprised by the amount of email and talkbacks I received about the Circuit City liquidation sale. Most readers touched on the same theme: High prices, poor service and expectations that...

    Blog posts | January 20, 2009 7:00am PST

  • Apple continues abuse of App store

    If any company desperately needs a clueful community manager, it's Apple. I've written before about the company's issues with the App store and the way it treats developers (as have many others)...

    Blog posts | December 23, 2008 8:10am PST

ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

ie8 fix