Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. using do...loop until

using do...loop until

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
7 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abbhie
    wrote on last edited by
    #1

    hi, I'm using vb.net and I just want to ask about the do...loop until command. I understand that this is used whenever we want to do a condition all over again until it is true.. But what if it comes out till the end as false? How will I put it into code.. in such way as: Do loop until hope anyone can help me solve this out.. thanks.. ange

    C 1 Reply Last reply
    0
    • A Abbhie

      hi, I'm using vb.net and I just want to ask about the do...loop until command. I understand that this is used whenever we want to do a condition all over again until it is true.. But what if it comes out till the end as false? How will I put it into code.. in such way as: Do loop until hope anyone can help me solve this out.. thanks.. ange

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Abbhie wrote:

      But what if it comes out till the end as false? How will I put it into code..

      something = False


      Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

      A 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Abbhie wrote:

        But what if it comes out till the end as false? How will I put it into code..

        something = False


        Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

        A Offline
        A Offline
        Abbhie
        wrote on last edited by
        #3

        I want to put another statement if the result of the looping is still false (after its process)

        V D 2 Replies Last reply
        0
        • A Abbhie

          I want to put another statement if the result of the looping is still false (after its process)

          V Offline
          V Offline
          Volker Weichert
          wrote on last edited by
          #4

          The do loop checks at the end of the run whether the condition is true. If it is true it terminates. If the condition is still false, it starts again at the "do". Maybe you want to add another condition like do ... loop until (condition1=true or condition2=true) ?

          1 Reply Last reply
          0
          • A Abbhie

            I want to put another statement if the result of the looping is still false (after its process)

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            The Do While loop will run continuously until the condition is true. There is no alternate "end" of the loop. If that's a possibility, maybe you should be considering a different loop type, such as For/Next.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            A 1 Reply Last reply
            0
            • D Dave Kreskowiak

              The Do While loop will run continuously until the condition is true. There is no alternate "end" of the loop. If that's a possibility, maybe you should be considering a different loop type, such as For/Next.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              A Offline
              A Offline
              Abbhie
              wrote on last edited by
              #6

              Thanks Dave.. I was thinking of that too as an alternative. But I just don't know what's that for and how to use it. i just saw it in the MSDN Support.

              D 1 Reply Last reply
              0
              • A Abbhie

                Thanks Dave.. I was thinking of that too as an alternative. But I just don't know what's that for and how to use it. i just saw it in the MSDN Support.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                If you don't know what a For/Next loop is, you REALLY need to pick up a beginners book on VB.NET. A For/Next loop is one of those very basic concepts they teach on the second day of class in any course involving VB.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups