Thread: Infinite

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    27
    Rep Power
    0

    Infinite


    What is infinite?

    Code:
    while (b < 13):
    can i just change the number 13? what do i change it to?


    omgnewb
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2005
    Posts
    75
    Rep Power
    9
    Originally Posted by JhonnyO@gmail.c
    What is infinite?

    Code:
    while (b < 13):
    can i just change the number 13? what do i change it to?


    omgnewb
    infinite means without bounds....if you are having an infinite loop problem, that means that b is always less than 13 do the while loop never stops
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    I dont get what you mean, but if you mean infinite loop...

    while True:
    ...
    while 1:
    ...

    Depends you can use anything that will always be true, because if it goes to false it will exit the loop

    Comments on this post

    • Peyton agrees
  6. #4
  7. Commie Mutant Traitor
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2004
    Location
    Norcross, GA (again)
    Posts
    1,804
    Rep Power
    1569
    Can you show us the body of the while: loop? As it is, there's no what to see where b is getting changed, if at all, and why it never goes above 13.
    Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
    #define KINSEY (rand() % 7) λ Scheme is the Red Pill
    Scheme in Short Understanding the C/C++ Preprocessor
    Taming Python A Highly Opinionated Review of Programming Languages for the Novice, v1.1

    FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    27
    Rep Power
    0
    That was just used as an example..
    I'm really bad at explaining, but what i meant was, what means infinite? sort of....
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Code:
    1. Having no boundaries or limits.
    2. Immeasurably great or large; boundless: infinite patience; a discovery of infinite importance.
    3. Mathematics.
          1. Existing beyond or being greater than any arbitrarily large value.
          2. Unlimited in spatial extent: a line of infinite length.
          3. Of or relating to a set capable of being put into one-to-one correspondence with a proper subset of itself.
  12. #7
  13. Walrus Gramps
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2005
    Location
    San Antonio, Texas
    Posts
    1,229
    Rep Power
    619
    This is an infinite loop:
    Code:
    number = 2
    
    while (number < 13):           
    	print "This is an infinite loop"
    #number never changes
    This is not an infinite loop:
    Code:
    number = 2
    
    while (number < 13):
    	print "This is not an infinite loop"
    	number += 1		# increment the variable
    #number eventually becomes 13
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    27
    Rep Power
    0
    Thanks, sorry for the dumb question

IMN logo majestic logo threadwatch logo seochat tools logo