Results 1 to 12 of 12

Thread: [2008] Infinite loop

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    28

    [2008] Infinite loop

    Hey all, long time no type

    I was in college and our teacher mentioned about the Beep() for the system beeping, and i was like shall i do a do while loop :P


    So i made a button on a form and wrote this

    Dim count as byte = 1

    Do While count = 1
    Beep()
    Me.visible = False
    Loop



    Now that was mistake in its self but hey i was bored at college.

    Now i know i crash the program etc but what would happen if i just leave the loop to run?

    Ben
    New To VB.Net
    Learning PHP and MYSQL aswell
    Currently In Development:
    Www.irn3rd.co.uk - Mysite
    Another Wesbite - In Planning
    WWW.jumpandslide.co.uk - Being redeveloped,

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: [2008] Infinite loop

    it'd just keep beeping + looping until you shut it down probably

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    28

    Re: [2008] Infinite loop

    yh but what damage will it do:P if any haha
    New To VB.Net
    Learning PHP and MYSQL aswell
    Currently In Development:
    Www.irn3rd.co.uk - Mysite
    Another Wesbite - In Planning
    WWW.jumpandslide.co.uk - Being redeveloped,

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2008] Infinite loop

    It wont do any damage. There loop isnt recursive so there'll be no stack overflow, and there will not be any memory leaks unless the Beep function was improperly implemented, if thats what you're thinking of.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: [2008] Infinite loop

    Yeah, the only damage it will do will be to your person when everybody else beats the tar out of you for running that thing.
    My usual boring signature: Nothing

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [2008] Infinite loop

    the damage, if any could be to your hearing.... sanity.... and could lead to a life terminating event should it annoy others to the point where there is damage to their hearing or sanity....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    28

    Re: [2008] Infinite loop

    Quote Originally Posted by Atheist
    It wont do any damage. There loop isnt recursive so there'll be no stack overflow, and there will not be any memory leaks unless the Beep function was improperly implemented, if thats what you're thinking of.
    How would you make the beep function improperly implemented tho

    Quote Originally Posted by Shaggy Hiker
    Yeah, the only damage it will do will be to your person when everybody else beats the tar out of you for running that thing.

    Quote Originally Posted by techgnome
    the damage, if any could be to your hearing.... sanity.... and could lead to a life terminating event should it annoy others to the point where there is damage to their hearing or sanity....

    -tg
    Haha they are all valid reasons i know and i aint had that happen to me yet?

    any one want the beep code for the supermario theme tune?
    New To VB.Net
    Learning PHP and MYSQL aswell
    Currently In Development:
    Www.irn3rd.co.uk - Mysite
    Another Wesbite - In Planning
    WWW.jumpandslide.co.uk - Being redeveloped,

  8. #8
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2008] Infinite loop

    Quote Originally Posted by irn3rd0987
    How would you make the beep function improperly implemented tho
    Since you cant do anything about it, you'll just have to trust the developers at Microsoft
    Last edited by Atheist; Oct 16th, 2008 at 06:40 PM.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  9. #9
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: [2008] Infinite loop

    dr who theme tune - pc speaker beeps

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    28

    Re: [2008] Infinite loop

    cant get the code and lol damn taht Microsoft must be a way:P
    New To VB.Net
    Learning PHP and MYSQL aswell
    Currently In Development:
    Www.irn3rd.co.uk - Mysite
    Another Wesbite - In Planning
    WWW.jumpandslide.co.uk - Being redeveloped,

  11. #11
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: [2008] Infinite loop

    Can't get what code? What Atheist meant was that the beep function will have no memory leaks or other issues as long as MS implemented it correctly.
    My usual boring signature: Nothing

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    28

    Re: [2008] Infinite loop

    Quote Originally Posted by .paul.
    dr who theme tune - pc speaker beeps
    I cant convert the above links downloaded code VS 2008 tries to convert it and it wont work, but my mate tried it on 2005 VS and said the sequence aint that good lol:P
    New To VB.Net
    Learning PHP and MYSQL aswell
    Currently In Development:
    Www.irn3rd.co.uk - Mysite
    Another Wesbite - In Planning
    WWW.jumpandslide.co.uk - Being redeveloped,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width