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. Other Discussions
  3. The Weird and The Wonderful
  4. Infinite Loop

Infinite Loop

Scheduled Pinned Locked Moved The Weird and The Wonderful
com
2 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    CMullikin
    wrote on last edited by
    #1

    While trying to find a possible infinite loop, I added the second line below:

    while true do begin
      **Reset(CurrFile);**
      ReadLn(CurrFile,Pierce);
    

    The break statement to exit the while loop depends on making it to a specific line in the file. Since I already read some lines before this, I thought just in case the line I was waiting for was above them, I would reset the file. After debugging this a few times, I realized that I was an idiot, and I moved the reset to just before the while... :sigh:

    The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin

    G 1 Reply Last reply
    0
    • C CMullikin

      While trying to find a possible infinite loop, I added the second line below:

      while true do begin
        **Reset(CurrFile);**
        ReadLn(CurrFile,Pierce);
      

      The break statement to exit the while loop depends on making it to a specific line in the file. Since I already read some lines before this, I thought just in case the line I was waiting for was above them, I would reset the file. After debugging this a few times, I realized that I was an idiot, and I moved the reset to just before the while... :sigh:

      The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin

      G Offline
      G Offline
      Gary R Wheeler
      wrote on last edited by
      #2

      I'm sure I've done that one. More than once. Hangs head in shame...

      Software Zen: delete this;

      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